:root {
    --app-bg: #f3f5f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text-main: #111827;
    --text-muted: #6b7280;
    --accent: #0f766e;
    --accent-soft: #e6f4f1;
    --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
    --radius-lg: 1rem;
}

* {
    box-sizing: border-box;
}

body.dashboard-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-main);
    background: var(--app-bg);
    min-height: 100dvh;
    overflow-x: hidden;
}

body.trading-room-fullscreen-open {
    overflow: hidden;
}

.bg-app {
    background: linear-gradient(180deg, #f9fafb 0%, #f3f5f8 35%, #f3f5f8 100%);
}

.bg-soft-auth {
    background: radial-gradient(circle at top, #eef3f8 0%, #f5f7fb 45%, #f3f5f8 100%);
    min-height: 100vh;
}

.app-shell {
    min-height: 100dvh;
    display: flex;
    min-width: 0;
}

.app-sidebar {
    width: 284px;
    flex: 0 0 284px;
    background: transparent;
    padding: 1rem;
}

.app-main {
    min-height: 100dvh;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
}

.app-main .container-fluid {
    max-width: 100%;
}

.topbar {
    z-index: 1030;
}

.topbar > div {
    border: 0 !important;
    box-shadow: var(--shadow-soft);
    border-radius: 0 0 1rem 1rem;
    margin: 0.6rem 0.9rem 0;
    gap: 0.5rem;
}

.topbar-status-dot {
    font-size: 0.5rem;
}

.topbar-brand-logo {
    max-width: 152px;
    width: auto;
    height: 30px;
    object-fit: contain;
    border-radius: 0.35rem;
}

.topbar-quick-btn,
.topbar-profile-btn {
    white-space: nowrap;
}

.sidebar-brand-dot {
    width: 10px;
    height: 10px;
}

.dashboard-brand-logo {
    max-width: 170px;
    width: auto;
    height: 34px;
    object-fit: contain;
    border-radius: 0.4rem;
}

.auth-brand-logo {
    max-width: 180px;
    width: auto;
    height: 36px;
    object-fit: contain;
    border-radius: 0.4rem;
}

.page-content-spacer {
    padding-bottom: calc(6rem + env(safe-area-inset-bottom));
}

.page-title {
    font-size: clamp(1.08rem, 3.4vw, 1.45rem);
    line-height: 1.25;
}

.page-subtitle {
    font-size: clamp(0.82rem, 2.6vw, 0.95rem);
}

.subscription-overview-card {
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.1), transparent 34%),
        #ffffff;
}

.subscription-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
}

.subscription-safe-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.62rem 0.9rem;
    white-space: nowrap;
}

.subscription-plans-panel {
    animation: subscriptionPanelIn 0.22s ease both;
    overflow: visible;
}

.subscription-plan-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 1rem;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
    padding: 1rem;
}

.subscription-plan-flip {
    height: 380px;
    min-height: 380px;
    perspective: 1200px;
}

.subscription-plan-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    transition: transform 0.46s cubic-bezier(0.22, 1, 0.36, 1);
    transform-style: preserve-3d;
}

.subscription-plan-flip.is-flipped .subscription-plan-flip-inner {
    transform: rotateY(180deg);
}

.subscription-plan-face {
    position: absolute;
    inset: 0;
    height: 100%;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.subscription-plan-front {
    z-index: 2;
}

.subscription-plan-back {
    transform: rotateY(180deg);
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.subscription-plan-front .btn,
.subscription-plan-back > .btn {
    margin-top: auto;
}

.manual-payment-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.manual-payment-details {
    background: #f8fafc;
    border-radius: 0.75rem;
    color: #334155;
    font-size: 0.82rem;
    line-height: 1.55;
    padding: 0.75rem;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .subscription-plan-flip {
        height: 410px;
        min-height: 410px;
    }
}

@keyframes subscriptionPanelIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

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

.trading-room-shell {
    min-width: 0;
}

.trading-room-control-card {
    overflow: hidden;
}

.trading-room-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.trading-room-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-start;
}

.trading-room-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.28rem;
    border-radius: 999px;
    background: #eef2f7;
}

.trading-room-toggle button {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.62rem 0.82rem;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.trading-room-toggle button.active {
    background: #111827;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.16);
}

.trading-room-toggle button.is-loading,
.trading-room-source-menu .dropdown-item.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.trading-room-chart-card {
    overflow: hidden;
}

.trading-room-chart-card.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 2050;
    box-sizing: border-box;
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    padding: 0.85rem;
}

.trading-room-chart-card.is-fullscreen .trading-room-chart-wrap {
    flex: 1 1 auto;
    min-height: 0;
}

.trading-room-chart-card.is-fullscreen .trading-room-chart {
    height: 100%;
    min-height: 0;
}

.trading-room-chart-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1rem 0.7rem;
}

.trading-room-fullscreen-brand {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 8.8rem;
    max-width: 24vw;
    min-height: 2.55rem;
    border-radius: 0.9rem;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
    padding: 0.45rem 0.7rem;
    text-decoration: none;
}

.trading-room-fullscreen-brand img {
    display: block;
    width: 100%;
    max-height: 2rem;
    object-fit: contain;
}

.trading-room-fullscreen-brand span {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.trading-room-chart-card.is-fullscreen .trading-room-fullscreen-brand {
    display: inline-flex;
    order: 2;
    margin-left: auto;
}

.trading-room-chart-card.is-fullscreen .trading-room-header-picker {
    order: 3;
}

.trading-room-chart-card.is-fullscreen .trading-room-timeframes {
    order: 1;
}

.trading-room-chart-card.is-fullscreen .trading-room-actions {
    order: 4;
}

.trading-room-header-picker {
    flex: 0 0 auto;
    min-width: 0;
}

.trading-room-instrument-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.45rem;
    max-width: 100%;
    border: 0;
    border-radius: 0.9rem;
    background: #f8fafc;
    color: #0f172a;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
    padding: 0.55rem 0.78rem;
    text-align: left;
}

.trading-room-instrument-button span {
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.trading-room-instrument-button small {
    max-width: 145px;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trading-room-instrument-button i {
    color: #64748b;
    font-size: 0.74rem;
}

.trading-room-candle-clock {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.48rem 0.78rem;
}

.trading-room-candle-clock strong {
    color: #0f172a;
}

.trading-room-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 13.5rem;
    max-width: 100%;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.48rem 0.78rem;
    white-space: nowrap;
}

.trading-room-status.ready {
    background: var(--accent-soft);
    color: var(--accent);
}

.trading-room-status.error {
    background: #fee2e2;
    color: #b91c1c;
    white-space: nowrap;
}

.trading-room-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.trading-room-fullscreen-button {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.trading-room-fullscreen-button:hover,
.trading-room-fullscreen-button:focus-visible {
    background: #0f172a;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(17, 24, 39, 0.22);
}

.trading-room-fullscreen-button:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.24);
    outline-offset: 2px;
}

.trading-room-chart-wrap {
    position: relative;
    min-height: 620px;
    overflow: hidden;
}

.trading-room-chart {
    position: relative;
    width: 100%;
    height: 620px;
    transition: filter 0.18s ease, opacity 0.18s ease;
}

.trading-room-chart-wrap.is-loading .trading-room-chart,
.trading-room-chart-wrap.is-loading .trading-room-zone-overlay {
    filter: blur(2px);
    opacity: 0.58;
}

.trading-room-zone-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    transition: filter 0.18s ease, opacity 0.18s ease;
}

.trading-room-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 7;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.trading-room-chart-wrap.is-loading .trading-room-loading-overlay {
    display: flex;
}

.trading-room-loader-card {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    padding: 0.72rem 1rem;
    font-size: 0.82rem;
}

.trading-room-bias-pill {
    position: absolute;
    z-index: 6;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #475569;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    padding: 0.55rem 0.9rem;
    white-space: nowrap;
}

.trading-room-source-menu .dropdown-item span {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.trading-room-source-menu {
    min-width: 235px;
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    max-height: min(28rem, calc(100vh - 9rem));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.45rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.trading-room-source-menu::-webkit-scrollbar {
    width: 0.45rem;
}

.trading-room-source-menu::-webkit-scrollbar-track {
    background: transparent;
}

.trading-room-source-menu::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.35);
    border-radius: 999px;
}

.trading-room-source-menu .dropdown-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    border-radius: 0.75rem;
    padding: 0.7rem 0.85rem;
}

.trading-room-source-menu .dropdown-item.active,
.trading-room-source-menu .dropdown-item:active {
    background: #111827;
    color: #ffffff;
}

.trading-room-source-menu .dropdown-item small {
    color: #64748b;
    font-size: 0.72rem;
}

.trading-room-source-menu .dropdown-item.active small,
.trading-room-source-menu .dropdown-item:active small {
    color: rgba(255, 255, 255, 0.72);
}

.trading-room-bias-pill span {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 700;
}

.trading-room-bias-pill strong {
    font-size: 0.98rem;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.trading-room-bias-pill.buy strong {
    color: var(--accent);
}

.trading-room-bias-pill.sell strong {
    color: #dc2626;
}

.trading-room-side-panel {
    display: flex;
    flex-direction: column;
}

.trading-room-insight-card {
    border-radius: 1rem;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
    padding: 1rem;
    margin-bottom: 0.8rem;
}

.trading-room-insight-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.trading-room-insight-card strong {
    display: block;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 950;
    letter-spacing: 0.04em;
}

.trading-room-insight-card p {
    color: #64748b;
    font-size: 0.78rem;
    line-height: 1.45;
    margin: 0.4rem 0 0;
}

.trading-room-insight-card.buy strong {
    color: var(--accent);
}

.trading-room-insight-card.sell strong {
    color: #dc2626;
}

.trading-room-pressure-meter {
    position: relative;
    display: flex;
    height: 0.52rem;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(90deg, #dff8eb 0%, #eef2f7 50%, #fee2e2 100%);
    margin-top: 0.75rem;
}

.trading-room-pressure-meter::after {
    content: "";
    position: absolute;
    top: -0.15rem;
    bottom: -0.15rem;
    left: 50%;
    width: 2px;
    background: rgba(15, 23, 42, 0.16);
}

.trading-room-pressure-meter span {
    position: relative;
    z-index: 1;
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease;
}

.trading-room-pressure-meter.pressure-buy {
    justify-content: flex-start;
}

.trading-room-pressure-meter.pressure-buy span {
    background: linear-gradient(90deg, #0f766e, #22c55e);
}

.trading-room-pressure-meter.pressure-sell {
    justify-content: flex-end;
}

.trading-room-pressure-meter.pressure-sell span {
    background: linear-gradient(90deg, #fb7185, #dc2626);
}

.trading-room-trend-meter {
    height: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
    margin-top: 0.75rem;
}

.trading-room-trend-meter span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #22c55e);
    transition: width 0.25s ease;
}

.trading-room-side-stat {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.95rem 0;
    border-bottom: 1px solid #eef2f7;
}

.trading-room-side-stat span {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.trading-room-side-stat strong {
    font-size: 1rem;
}

.trading-room-lock-icon {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.45rem;
}

.page-header-actions {
    width: 100%;
    flex-wrap: wrap;
}

.flat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 0;
    font-size: 0.94rem;
}

.flat-card h3.h6,
.flat-card h4.h6 {
    font-size: 0.92rem;
}

.auth-shell {
    background: var(--surface);
    border-radius: 1.2rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.09);
}

.featured-plan {
    background: linear-gradient(180deg, #ffffff 0%, #f1fbf9 100%);
}

.icon-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.75rem;
}

.stat-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.stat-value {
    font-size: clamp(0.94rem, 3.4vw, 1.42rem);
}

.dashboard-table th,
.dashboard-table td {
    border-color: #eef2f6;
    vertical-align: middle;
    white-space: nowrap;
}

.table-responsive {
    max-width: 100%;
}

.dashboard-table thead th {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}

.pagination {
    --bs-pagination-font-size: 0.875rem;
    --bs-pagination-color: #374151;
    --bs-pagination-bg: #ffffff;
    --bs-pagination-border-color: #d1d5db;
    --bs-pagination-hover-color: #111827;
    --bs-pagination-hover-bg: #f3f4f6;
    --bs-pagination-hover-border-color: #9ca3af;
    --bs-pagination-focus-color: #111827;
    --bs-pagination-focus-bg: #f3f4f6;
    --bs-pagination-focus-box-shadow: 0 0 0 0.2rem rgba(17, 24, 39, 0.12);
    --bs-pagination-active-color: #ffffff;
    --bs-pagination-active-bg: #212529;
    --bs-pagination-active-border-color: #212529;
    --bs-pagination-disabled-color: #9ca3af;
    --bs-pagination-disabled-bg: #f9fafb;
    --bs-pagination-disabled-border-color: #e5e7eb;
}

.pagination .page-link {
    font-weight: 600;
}

.status-badge {
    font-size: 0.66rem;
    letter-spacing: 0.06em;
}

.timeline .timeline-item {
    border-left: 2px solid #e5e7eb;
    margin-left: 0.4rem;
    padding-left: 1rem;
    position: relative;
}

.timeline .timeline-item::before {
    content: '';
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--accent);
    position: absolute;
    left: -0.36rem;
    top: 0.35rem;
}

.app-nav .nav-link {
    margin-bottom: 0.3rem;
    border: 0;
    transition: 0.2s ease;
}

.app-nav .nav-link:hover {
    background: #edf2f7;
    color: #111827;
}

.sidebar-nav-group {
    margin-bottom: 0.3rem;
}

.sidebar-nav-group summary {
    list-style: none;
    cursor: pointer;
}

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

.sidebar-nav-chevron {
    font-size: 0.75rem;
    transition: transform 0.18s ease;
}

.sidebar-nav-group[open] .sidebar-nav-chevron {
    transform: rotate(180deg);
}

.sidebar-subnav {
    display: grid;
    gap: 0.25rem;
    margin: 0.35rem 0 0.45rem 1.35rem;
    padding-left: 0.55rem;
    border-left: 1px solid #e8eef5;
}

.sidebar-subnav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.75rem;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.18s ease;
}

.sidebar-subnav-link:hover {
    background: #f4f7fb;
    color: #111827;
}

.sidebar-subnav-link.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.sidebar-subnav-link.active::before {
    content: '';
    position: absolute;
    left: -0.65rem;
    top: 50%;
    width: 0.22rem;
    height: 1.45rem;
    border-radius: 999px;
    background: var(--accent);
    transform: translateY(-50%);
}

.sidebar-subnav-link.active i {
    color: var(--accent);
}

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.1);
    display: flex;
    padding: 0.5rem 0.2rem calc(0.5rem + env(safe-area-inset-bottom));
}

.telegram-live-chat {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1035;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.telegram-live-chat a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background-color: #01a5e2;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(1, 165, 226, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.telegram-live-chat a:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(1, 165, 226, 0.42);
}

.telegram-live-chat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
}

.telegram-live-chat__icon svg {
    width: 1.35rem;
    height: 1.35rem;
    fill: currentColor;
}

.telegram-live-chat__bubble {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    max-width: min(250px, calc(100vw - 6.5rem));
    padding: 0.95rem 2.35rem 0.95rem 1rem;
    border-radius: 18px;
    background: #ffffff;
    color: #14213d;
    font-size: 0.86rem;
    font-weight: 800;
    line-height: 1.25;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
}

.telegram-live-chat.is-tooltip-hidden .telegram-live-chat__bubble {
    display: none;
}

.telegram-live-chat__close {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border: 0;
    border-radius: 999px;
    background: #eef5f8;
    color: #587386;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.telegram-live-chat__close:hover {
    background: #dbeaf1;
    color: #14213d;
}

.telegram-live-chat__bubble::after {
    content: "";
    position: absolute;
    right: -7px;
    bottom: 16px;
    width: 14px;
    height: 14px;
    background: #ffffff;
    transform: rotate(45deg);
    box-shadow: 8px -8px 18px rgba(15, 23, 42, 0.04);
}

.telegram-live-chat::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 1px solid #01a5e2;
    animation: dashboardTelegramPulse 2.4s ease-out infinite;
    z-index: -1;
}

@keyframes dashboardTelegramPulse {
    0% {
        opacity: 0.65;
        transform: scale(1);
    }
    80%,
    100% {
        opacity: 0;
        transform: scale(1.75);
    }
}

.mobile-nav-item {
    text-decoration: none;
    color: #64748b;
    background: transparent;
    border: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-size: 0.72rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    text-overflow: ellipsis;
    overflow: hidden;
}

.mobile-nav-item i {
    font-size: 1.05rem;
}

.mobile-nav-item.active {
    color: var(--accent);
}

.mobile-more-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    z-index: 1045;
    display: none;
}

.mobile-more-backdrop.is-open {
    display: block;
}

.mobile-more-popover {
    position: fixed;
    right: 0.7rem;
    bottom: calc(4.35rem + env(safe-area-inset-bottom));
    width: min(78vw, 290px);
    z-index: 1050;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0.95rem;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.2);
    padding: 0.45rem;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.2s ease;
}

.mobile-more-popover::after {
    content: '';
    position: absolute;
    right: 1rem;
    bottom: -0.36rem;
    width: 0.75rem;
    height: 0.75rem;
    background: #fff;
    transform: rotate(45deg);
    border-radius: 2px;
}

.mobile-more-popover.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mobile-more-header {
    padding: 0.35rem 0.45rem 0.5rem;
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 0.35rem;
}

.mobile-more-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.mobile-more-item {
    text-decoration: none;
    color: #334155;
    background: #f8fafc;
    border-radius: 0.7rem;
    padding: 0.6rem 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.mobile-more-item.active {
    color: #0f766e;
    background: #e6f4f1;
}

/* iOS viewport stabilization for fixed bottom navigation + sticky header layouts. */
@supports (-webkit-touch-callout: none) {
    html,
    body.dashboard-body {
        min-height: -webkit-fill-available;
    }

    .app-shell,
    .app-main,
    .bg-soft-auth {
        min-height: -webkit-fill-available;
    }
}

.site-settings-preview-logo {
    max-width: 180px;
    max-height: 56px;
    object-fit: contain;
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.25rem;
    box-shadow: var(--shadow-soft);
}

.site-settings-preview-favicon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 0.35rem;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.settings-workspace {
    --settings-border: rgba(15, 23, 42, 0.08);
    --settings-muted: #64748b;
}

.settings-hero {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.settings-eyebrow {
    display: inline-flex;
    margin-bottom: 0.45rem;
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settings-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 0.75rem;
    min-width: min(100%, 430px);
}

.settings-hero-grid > div {
    border: 1px solid var(--settings-border);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.78);
    padding: 0.8rem;
}

.settings-hero-grid span {
    display: block;
    color: var(--settings-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.settings-hero-grid strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.84rem;
    text-transform: capitalize;
}

.settings-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.settings-tabs-card {
    position: sticky;
    top: 0.75rem;
    z-index: 5;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
}

.settings-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem;
    scrollbar-width: thin;
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.62rem 0.82rem;
    background: #f8fafc;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-tab:hover {
    border-color: rgba(15, 118, 110, 0.18);
    background: #ecfeff;
    color: #0f766e;
}

.settings-tab.active {
    border-color: rgba(15, 118, 110, 0.2);
    background: #0f172a;
    color: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

.settings-tab-panel {
    animation: settings-panel-in 0.22s ease both;
}

@keyframes settings-panel-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

.settings-panel {
    overflow: hidden;
    border: 1px solid var(--settings-border);
    border-radius: 1rem;
    background: #fff;
}

.settings-panel-static {
    overflow: visible;
}

.settings-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
}

.settings-panel-title span {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    color: #0f172a;
}

.settings-panel-title i {
    color: #0f766e;
}

.settings-panel-title small {
    color: var(--settings-muted);
    text-align: right;
}

.settings-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    cursor: pointer;
    list-style: none;
}

.settings-panel summary::-webkit-details-marker {
    display: none;
}

.settings-panel summary span {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    color: #0f172a;
}

.settings-panel summary i {
    color: #0f766e;
}

.settings-panel summary small {
    color: var(--settings-muted);
    text-align: right;
}

.settings-panel summary::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    color: #94a3b8;
    transition: transform 0.2s ease;
}

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

.settings-panel-body {
    border-top: 1px solid var(--settings-border);
    background: #fbfdff;
    padding: 1.1rem;
}

.settings-note {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    border: 1px solid rgba(14, 116, 144, 0.14);
    border-radius: 0.85rem;
    background: #ecfeff;
    color: #155e75;
    padding: 0.8rem;
    font-size: 0.82rem;
}

.settings-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.settings-toggle-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid var(--settings-border);
    border-radius: 0.95rem;
    background: #fff;
    padding: 0.95rem;
}

.settings-toggle-card-wide {
    grid-column: 1 / -1;
}

.settings-toggle-card strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #0f172a;
    font-size: 0.9rem;
}

.settings-toggle-card p {
    margin: 0;
    color: var(--settings-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.settings-mini-panel {
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
    padding: 1rem;
}

.settings-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.settings-check-card,
.settings-chip-check {
    cursor: pointer;
    user-select: none;
}

.settings-check-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    padding: 0.75rem;
    transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.settings-check-card:has(input:checked) {
    background: #ecfdf5;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.24), 0 10px 24px rgba(15, 23, 42, 0.06);
}

.settings-check-card:hover,
.settings-chip-check:hover {
    transform: translateY(-1px);
}

.settings-check-card input {
    margin-top: 0.2rem;
}

.settings-check-card strong {
    display: block;
    color: #0f172a;
    font-size: 0.86rem;
}

.settings-check-card small {
    display: block;
    color: #64748b;
    font-size: 0.76rem;
    line-height: 1.35;
}

.settings-chip-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.settings-chip-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-chip-check span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.1rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.45rem 0.75rem;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.settings-chip-check input:checked + span {
    background: #111827;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

.flash-toast-stack {
    z-index: 1085;
    width: min(92vw, 380px);
    pointer-events: none;
}

.flash-toast {
    pointer-events: auto;
    border-radius: 0.85rem;
    padding: 0.72rem 0.8rem;
    color: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
    margin-bottom: 0.65rem;
    transform: translateY(-8px);
    opacity: 0;
    animation: flashToastIn 0.22s ease forwards;
}

.flash-toast-success {
    background: linear-gradient(180deg, #1f8f4d 0%, #15803d 100%);
}

.flash-toast-error {
    background: linear-gradient(180deg, #dc2626 0%, #b91c1c 100%);
}

.flash-toast-icon {
    line-height: 1;
}

.flash-toast-close {
    opacity: 0.9;
    margin-top: 0.08rem;
}

.flash-toast.is-hiding {
    animation: flashToastOut 0.2s ease forwards;
}

@keyframes flashToastIn {
    from {
        transform: translateY(-8px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes flashToastOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-6px);
        opacity: 0;
    }
}

.list-group-item {
    border-left: 0;
    border-right: 0;
}

.terminal-mobile-card {
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
}

.terminal-mobile-title {
    font-size: 0.86rem;
    line-height: 1.35;
    word-break: break-word;
}

.terminal-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.85rem;
}

.terminal-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 0.65rem;
    font-size: 0.92rem;
}

@media (max-width: 1199.98px) {
    .topbar > div {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        border-radius: 0.9rem;
    }
}

@media (min-width: 1200px) {
    .page-content-spacer {
        padding-bottom: 2rem;
    }

    .mobile-bottom-nav {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    .telegram-live-chat {
        right: 0.9rem;
        bottom: calc(5.2rem + env(safe-area-inset-bottom));
        gap: 0.55rem;
        z-index: 1030;
    }

    .telegram-live-chat a,
    .telegram-live-chat__icon {
        width: 52px;
        height: 52px;
    }

    .telegram-live-chat::before {
        width: 52px;
        height: 52px;
    }

    .telegram-live-chat__bubble {
        max-width: min(220px, calc(100vw - 5.8rem));
        padding: 0.68rem 0.82rem;
        border-radius: 15px;
        font-size: 0.74rem;
    }
}

@media (min-width: 768px) {
    .page-header-actions {
        width: auto;
    }
}

@media (max-width: 575.98px) {
    .topbar > div {
        margin: 0.35rem;
        border-radius: 0.75rem;
        padding: 0.5rem 0.6rem !important;
    }

    .topbar-actions {
        gap: 0.35rem !important;
    }

    .topbar .btn {
        font-size: 0.74rem;
        padding: 0.3rem 0.46rem;
    }

    .flat-card.p-4,
    .card .card-body {
        padding: 0.9rem !important;
    }

    .dashboard-table {
        font-size: 0.8rem;
    }

    .status-badge {
        font-size: 0.6rem;
    }

    .mobile-nav-item {
        font-size: 0.64rem;
    }

    .terminal-mobile-grid {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .settings-section-heading,
    .settings-panel summary,
    .settings-panel-title,
    .settings-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-tabs-card {
        position: static;
    }

    .settings-tabs {
        gap: 0.4rem;
        padding-bottom: 0.35rem;
    }

    .settings-tab {
        padding: 0.55rem 0.7rem;
        font-size: 0.78rem;
    }

    .settings-toggle-grid {
        grid-template-columns: 1fr;
    }

    .settings-toggle-card {
        align-items: center;
    }

    .settings-check-grid {
        grid-template-columns: 1fr;
    }

    .settings-chip-checks {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .settings-panel summary small,
    .settings-panel-title small {
        text-align: left;
    }

    .settings-hero-grid {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .settings-actions .btn {
        width: 100%;
    }

    .trading-room-toolbar,
    .trading-room-toggle {
        width: 100%;
    }

    .trading-room-toggle {
        justify-content: center;
        border-radius: 1rem;
    }

    .trading-room-toggle button {
        flex: 1 1 auto;
        padding: 0.58rem 0.62rem;
    }

    .trading-room-chart-top {
        align-items: stretch;
        flex-direction: column;
        padding: 0.85rem;
    }

    .trading-room-header-picker,
    .trading-room-instrument-button {
        width: 100%;
    }

    .trading-room-source-menu {
        max-height: min(24rem, calc(100vh - 12rem));
        width: 100%;
    }

    .trading-room-instrument-button {
        justify-content: space-between;
    }

    .trading-room-instrument-button small {
        max-width: 52vw;
    }

    .trading-room-status {
        justify-content: center;
        width: 100%;
    }

    .trading-room-actions {
        width: 100%;
    }

    .trading-room-actions .trading-room-status {
        flex: 1 1 auto;
        width: auto;
    }

    .trading-room-chart-wrap {
        min-height: 430px;
    }

    .trading-room-chart {
        height: 430px;
    }

    .trading-room-bias-pill {
        top: 0.75rem;
        padding: 0.48rem 0.75rem;
    }

    .trading-room-bias-pill span {
        display: none;
    }

    .trading-room-chart-card.is-fullscreen {
        padding: calc(0.5rem + env(safe-area-inset-top)) 0.5rem calc(0.5rem + env(safe-area-inset-bottom));
    }

    .trading-room-chart-card.is-fullscreen .trading-room-chart-top {
        align-items: center;
        display: grid;
        gap: 0.55rem;
        grid-template-columns: 1fr auto auto;
    }

    .trading-room-chart-card.is-fullscreen .trading-room-chart-wrap {
        min-height: 0;
    }

    .trading-room-chart-card.is-fullscreen .trading-room-fullscreen-brand {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        margin-left: 0;
        width: 5.8rem;
        max-width: 24vw;
        min-height: 2.25rem;
        padding: 0.35rem 0.5rem;
    }

    .trading-room-chart-card.is-fullscreen .trading-room-header-picker {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: stretch;
        width: 100%;
    }

    .trading-room-chart-card.is-fullscreen .trading-room-timeframes {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        width: auto;
    }

    .trading-room-chart-card.is-fullscreen .trading-room-actions {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        width: auto;
    }

    .trading-room-chart-card.is-fullscreen .trading-room-status {
        display: none;
    }
}

.setup-workspace {
    --setup-muted: #64748b;
    --setup-soft: #f8fafc;
    --setup-line: rgba(15, 23, 42, 0.08);
}

.setup-eyebrow {
    display: inline-flex;
    margin-bottom: 0.45rem;
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.setup-status-table {
    min-width: min(100%, 520px);
}

.setup-status-table .table {
    margin-bottom: 0;
}

.setup-tabs {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: thin;
}

.setup-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 0.72rem 1rem;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.setup-tab:hover {
    background: #e6f4f1;
    color: #0f766e;
}

.setup-tab.active {
    background: #0f172a;
    color: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
}

.setup-tab-content {
    padding-top: 0.25rem;
}

.setup-guide-card,
.setup-form-card {
    border-radius: 1.05rem;
    background: var(--setup-soft);
    padding: 1.15rem;
}

.setup-form-card {
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--setup-line);
}

.setup-guide-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.85rem;
    margin-bottom: 0.9rem;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.setup-steps {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding-left: 1.15rem;
    color: #334155;
    font-size: 0.88rem;
    line-height: 1.5;
}

.setup-note {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    border-radius: 0.9rem;
    background: #ecfeff;
    color: #155e75;
    padding: 0.8rem;
    font-size: 0.82rem;
    line-height: 1.45;
}

.setup-mode-pill {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #e6f4f1;
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 0.42rem 0.68rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.setup-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 0.95rem;
    background: #f8fafc;
    padding: 0.9rem;
}

.setup-switch-row strong,
.setup-switch-row span {
    display: block;
}

.setup-switch-row strong {
    color: #0f172a;
    font-size: 0.88rem;
}

.setup-switch-row span {
    color: var(--setup-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.setup-push-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.setup-push-status-grid > div {
    border-radius: 0.95rem;
    background: #f8fafc;
    padding: 0.9rem;
}

.setup-push-status-grid span,
.setup-push-status-grid strong {
    display: block;
}

.setup-push-status-grid span {
    color: var(--setup-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.setup-push-status-grid strong {
    margin-top: 0.22rem;
    color: #0f172a;
    font-size: 0.95rem;
}

@media (max-width: 575.98px) {
    .setup-tabs {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        overflow: visible;
    }

    .setup-tab {
        justify-content: center;
        width: 100%;
    }

    .setup-guide-card,
    .setup-form-card {
        padding: 0.95rem;
    }

    .setup-switch-row,
    .setup-push-status-grid {
        grid-template-columns: 1fr;
    }

    .setup-switch-row {
        align-items: flex-start;
    }
}
