﻿:root {
    --text: #eef4ff;
    --muted: #b8c2d8;
    --line: rgba(255, 255, 255, 0.16);
    --panel: rgba(26, 32, 45, 0.8);
    --panel-soft: rgba(30, 37, 54, 0.84);
    --gold: #f5c06a;
    --aqua: #56c7ff;
    --green: #22c55e;
}

* {
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

body {
    margin: 0;
    height: 100vh;
    overflow: hidden;
    color: var(--text);
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    background: linear-gradient(155deg, #102140 0%, #19263f 36%, #32243a 100%);
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: -3%;
    z-index: -2;
    background: url('/assets/background.png') center/cover no-repeat;
    opacity: 0.34;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 16% 78%, rgba(245, 182, 66, 0.24), transparent 34%),
                radial-gradient(circle at 84% 14%, rgba(78, 150, 255, 0.18), transparent 32%),
                linear-gradient(180deg, rgba(7, 8, 11, 0.22) 0%, rgba(7, 8, 11, 0.72) 90%);
}

.login-screen {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at 20% 80%, rgba(245, 192, 106, 0.2), transparent 30%),
        radial-gradient(circle at 82% 14%, rgba(86, 199, 255, 0.2), transparent 28%),
        rgba(7, 10, 18, 0.78);
    backdrop-filter: blur(16px);
    overflow: hidden;
}

.login-network {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.login-network::before,
.login-network::after {
    content: "";
    position: absolute;
    inset: -18%;
    opacity: 0.58;
    background:
        linear-gradient(112deg, transparent 0 39%, rgba(86, 199, 255, 0.26) 40%, transparent 41% 100%),
        linear-gradient(24deg, transparent 0 45%, rgba(245, 192, 106, 0.22) 46%, transparent 47% 100%),
        linear-gradient(156deg, transparent 0 53%, rgba(255, 255, 255, 0.12) 54%, transparent 55% 100%);
    background-size: 520px 260px, 440px 220px, 680px 340px;
    animation: networkDrift 18s linear infinite;
}

.login-network::after {
    opacity: 0.34;
    filter: blur(1px);
    transform: rotate(180deg);
    animation-duration: 26s;
    animation-direction: reverse;
}

.fund-node {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #f7d087;
    box-shadow: 0 0 0 6px rgba(245, 192, 106, 0.11), 0 0 28px rgba(245, 192, 106, 0.7);
    animation: nodeTravel 7s ease-in-out infinite;
}

.node-a { left: 12%; top: 68%; animation-delay: -0.7s; }
.node-b { left: 23%; top: 24%; animation-delay: -2.4s; background: var(--aqua); box-shadow: 0 0 0 6px rgba(86, 199, 255, 0.1), 0 0 28px rgba(86, 199, 255, 0.65); }
.node-c { left: 74%; top: 32%; animation-delay: -4.2s; }
.node-d { left: 82%; top: 72%; animation-delay: -1.6s; background: var(--green); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.1), 0 0 28px rgba(34, 197, 94, 0.6); }
.node-e { left: 48%; top: 84%; animation-delay: -5.4s; background: var(--aqua); box-shadow: 0 0 0 6px rgba(86, 199, 255, 0.1), 0 0 28px rgba(86, 199, 255, 0.65); }

.login-shell {
    position: relative;
    width: min(420px, 100%);
    padding-top: 45px;
    animation: loginRise 520ms ease-out both;
}

.login-logo {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 50%;
    width: 92px;
    height: 92px;
    transform: translateX(-50%);
    border-radius: 28px;
    padding: 7px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(245, 192, 106, 0.12));
    border: 1px solid rgba(245, 192, 106, 0.38);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.34), 0 0 44px rgba(245, 192, 106, 0.18);
}

.login-logo img {
    width: 100%;
    height: 100%;
    border-radius: 22px;
    object-fit: cover;
    display: block;
}

.login-card {
    width: 100%;
    border: 1px solid rgba(120, 200, 255, 0.3);
    border-radius: 24px;
    background:
        linear-gradient(130deg, rgba(22, 35, 62, 0.78), rgba(36, 25, 55, 0.7)),
        rgba(245, 248, 255, 0.06);
    box-shadow:
        0 28px 90px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    padding: 64px 24px 24px;
    backdrop-filter: blur(18px) saturate(1.2);
    text-align: center;
}

.login-card h1 {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 800;
    background: linear-gradient(120deg, #f6fbff, #cde4ff 50%, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-card p {
    margin: 0 0 12px;
    color: var(--muted);
}

.login-card input {
    text-align: center;
    border-color: rgba(150, 220, 255, 0.26);
    background: rgba(9, 13, 22, 0.56);
}

.login-card button:not(.ghost) {
    margin-top: 12px;
    color: #102015;
    background: linear-gradient(135deg, #f7cf7f, #f5b642);
    box-shadow: 0 16px 34px -22px rgba(245, 192, 106, 0.95);
}

.login-error {
    min-height: 18px;
    margin-top: 10px !important;
    color: #ff9a9a !important;
    font-size: 13px;
}

@keyframes networkDrift {
    from { transform: translate3d(-3%, -2%, 0); }
    to { transform: translate3d(8%, 5%, 0); }
}

@keyframes nodeTravel {
    0%, 100% { transform: translate3d(0, 0, 0) scale(0.9); opacity: 0.52; }
    45% { transform: translate3d(72px, -38px, 0) scale(1.18); opacity: 1; }
    70% { transform: translate3d(112px, 20px, 0) scale(0.96); opacity: 0.72; }
}

@keyframes loginRise {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.crm-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar {
    border-right: 1px solid rgba(120, 200, 255, 0.2);
    background:
        linear-gradient(150deg, rgba(22, 35, 62, 0.78), rgba(16, 20, 33, 0.82)),
        rgba(245, 248, 255, 0.04);
    backdrop-filter: blur(14px) saturate(1.12);
    padding: 16px;
}

.brand-head {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.brand-head img {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    border: 1px solid rgba(120, 200, 255, 0.26);
    object-fit: cover;
}

.brand-head h1 {
    margin: 0;
    font-size: 18px;
    background: linear-gradient(120deg, #f6fbff, #cde4ff 50%, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.04em;
}

.brand-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.label {
    display: block;
    margin: 12px 0 6px;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--gold);
}

input,
select,
textarea,
button {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #0c1220;
    color: var(--text);
    padding: 9px 10px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(245, 182, 66, 0.46);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(245, 182, 66, 0.76);
    box-shadow: 0 0 0 3px rgba(245, 182, 66, 0.12);
}

button {
    margin-top: 8px;
    cursor: pointer;
    font-weight: 800;
    border: none;
    color: #17120a;
    background: linear-gradient(135deg, #f7cf7f, #f5b642);
    box-shadow: 0 12px 24px -20px rgba(245, 192, 106, 0.92);
}

button:hover {
    background: #ffd06b;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button.ghost {
    color: var(--text);
    border: 1px solid rgba(133, 211, 255, 0.34);
    background: linear-gradient(130deg, rgba(62, 161, 255, 0.16), rgba(255, 255, 255, 0.07));
}

button.ghost:hover {
    border-color: rgba(245, 182, 66, 0.54);
    background: rgba(245, 182, 66, 0.08);
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 12px 0;
}

.link-home {
    display: inline-block;
    margin-top: 14px;
    color: var(--muted);
    text-decoration: none;
}

.session-box {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 10px;
}

.crm-nav {
    display: grid;
    gap: 7px;
    margin: 10px 0;
}

.crm-nav button {
    justify-content: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #dce7f7;
    text-align: left;
}

.crm-nav button:hover,
.crm-nav button.active {
    border-color: rgba(245, 182, 66, 0.46);
    background: linear-gradient(135deg, rgba(245, 182, 66, 0.16), rgba(78, 196, 255, 0.1));
    color: #ffe4b8;
}

.session-box span,
.session-box small {
    display: block;
}

.session-box span {
    color: #ffe4b8;
    font-weight: 800;
}

.session-box small {
    margin-top: 3px;
    color: var(--muted);
}

.settings-panel {
    margin-top: 12px;
    border: 1px solid rgba(120, 200, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 10px;
}

.settings-panel h3 {
    margin: 0 0 4px;
    color: #ffe4b8;
    font-size: 14px;
}

.setting-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.setting-row span {
    color: var(--muted);
    font-size: 13px;
}

.settings-status {
    min-height: 16px;
    margin: 6px 0 0;
    color: #8df0b3;
    font-size: 12px;
}

.filter-toggle {
    position: relative;
}

.filter-toggle::after {
    content: "▾";
    position: absolute;
    right: 12px;
}

.filter-panel {
    max-height: 440px;
    overflow: hidden;
    transition: max-height 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.filter-panel.collapsed {
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
}

.content {
    height: 100vh;
    overflow: hidden;
    padding: 12px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

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

.metric {
    border: 1px solid rgba(120, 200, 255, 0.2);
    border-radius: 8px;
    background: var(--panel-soft);
    padding: 9px 10px;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.metric:hover {
    border-color: rgba(245, 182, 66, 0.42);
    background: rgba(16, 24, 40, 0.9);
    transform: translateY(-1px);
}

.metric h3 {
    margin: 0;
    font-size: 20px;
    color: #ffe4b8;
}

.metric p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.metric small {
    display: block;
    margin-top: 4px;
    color: rgba(184, 194, 216, 0.72);
    font-size: 10px;
    line-height: 1.2;
}

.operator-metrics {
    border: 1px solid rgba(120, 200, 255, 0.18);
    border-radius: 8px;
    background: rgba(16, 24, 40, 0.72);
    overflow: hidden;
}

.operator-metrics-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 8px 10px;
}

.operator-metrics-head h3 {
    margin: 0;
    color: #ffe4b8;
    font-size: 13px;
}

.operator-metrics-head span {
    color: var(--muted);
    font-size: 11px;
}

.operator-metrics-table {
    max-height: 164px;
    overflow: auto;
}

.operator-metrics-table table {
    min-width: 720px;
}

.operator-metrics-table th,
.operator-metrics-table td {
    padding: 7px 9px;
    font-size: 12px;
}

.exchange-admin {
    border: 1px solid rgba(120, 200, 255, 0.16);
    border-radius: 8px;
    background: rgba(8, 13, 25, 0.66);
    margin-bottom: 8px;
    padding: 10px;
}

.exchange-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.exchange-admin-head h3 {
    margin: 0;
    color: #ffe4b8;
    font-size: 14px;
}

.exchange-admin-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.exchange-pair-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 8px;
    max-height: 275px;
    overflow: auto;
    padding-right: 3px;
}

.exchange-pair-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(16, 24, 40, 0.76);
    padding: 9px;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.exchange-pair-card:hover {
    border-color: rgba(245, 182, 66, 0.4);
    transform: translateY(-1px);
}

.pair-title,
.pair-rate,
.pair-switches {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pair-title b {
    color: #f6f1e8;
    font-size: 13px;
}

.pair-title span,
.pair-rate span,
.pair-rate small {
    color: var(--muted);
    font-size: 10px;
}

.pair-rate {
    margin: 8px 0;
}

.pair-rate b {
    color: #79d6ff;
}

.pair-switches label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #d9e3f5;
    font-size: 11px;
}

.pair-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin: 8px 0;
}

.pair-inputs label {
    color: var(--muted);
    font-size: 10px;
}

.pair-inputs input {
    width: 100%;
    margin-top: 3px;
    padding: 7px;
    font-size: 12px;
}

.exchange-pair-card button {
    width: 100%;
    padding: 8px;
    font-size: 12px;
}

.board {
    display: grid;
    grid-template-columns: minmax(300px, var(--orders-column, min(40%, 500px))) 10px minmax(520px, 1fr);
    gap: 6px;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

.board.is-resizing {
    user-select: none;
    cursor: col-resize;
}

.board-resizer {
    position: relative;
    min-height: 100%;
    border-radius: 999px;
    cursor: col-resize;
    touch-action: none;
    outline: none;
}

.board-resizer::before {
    content: "";
    position: absolute;
    inset: 14px 3px;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(120, 200, 255, 0.14);
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.board-resizer:hover::before,
.board-resizer:focus-visible::before,
.board.is-resizing .board-resizer::before {
    background: linear-gradient(180deg, rgba(245, 182, 66, 0.7), rgba(78, 196, 255, 0.5));
    box-shadow: 0 0 18px rgba(245, 182, 66, 0.22), inset 0 0 0 1px rgba(255, 238, 190, 0.45);
    transform: scaleX(1.15);
}

.table-wrap,
.order-card {
    border: 1px solid rgba(120, 200, 255, 0.2);
    border-radius: 8px;
    background: var(--panel);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.table-wrap {
    max-height: 100%;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 182, 66, 0.52) rgba(255, 255, 255, 0.035);
}

.table-wrap::-webkit-scrollbar,
.order-card::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.table-wrap::-webkit-scrollbar-track,
.order-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
    border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-thumb,
.order-card::-webkit-scrollbar-thumb {
    background: rgba(245, 182, 66, 0.38);
    border-radius: 999px;
    border: 2px solid rgba(10, 14, 24, 0.9);
}

.table-wrap::-webkit-scrollbar-thumb:hover,
.order-card::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 182, 66, 0.62);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 8px 9px;
    font-size: 13px;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(10, 15, 26, 0.98);
    color: #ffe4b8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tbody tr {
    cursor: pointer;
    transition: background 0.14s ease, box-shadow 0.14s ease;
}

tbody tr:hover {
    background: rgba(245, 182, 66, 0.09);
}

tbody tr.selected {
    background: rgba(245, 182, 66, 0.16);
    box-shadow: inset 3px 0 0 var(--gold);
}

td b {
    display: block;
    color: #fff3d6;
    font-size: 13px;
}

.vip-mini,
.vip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 192, 106, 0.5);
    border-radius: 999px;
    background: linear-gradient(120deg, rgba(245, 192, 106, 0.28), rgba(86, 199, 255, 0.12));
    color: #ffe4a3;
    box-shadow: 0 0 18px rgba(245, 192, 106, 0.16);
    font-weight: 900;
    letter-spacing: 0.06em;
}

.vip-mini {
    margin-left: 6px;
    padding: 2px 6px;
    font-size: 9px;
    vertical-align: middle;
}

.vip-badge {
    margin-left: 8px;
    padding: 3px 8px;
    font-size: 10px;
}

td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.status-pending {
    background: rgba(245, 182, 66, 0.14);
    color: #ffd88d;
}

.status-working {
    background: rgba(94, 170, 255, 0.14);
    color: #9fd0ff;
}

.status-payment_verified {
    background: rgba(255, 219, 99, 0.16);
    color: #ffe079;
}

.status-processing {
    background: rgba(114, 226, 161, 0.14);
    color: #85e7aa;
}

.status-payout_sent {
    background: rgba(120, 190, 255, 0.16);
    color: #a9d8ff;
}

.status-disputed {
    background: rgba(255, 117, 117, 0.16);
    color: #ffb0b0;
}

.status-completed {
    background: rgba(102, 232, 155, 0.18);
    color: #8df0b3;
}

.status-cancelled {
    background: rgba(255, 105, 105, 0.15);
    color: #ff9a9a;
}

.order-card {
    padding: 12px 14px;
    max-height: 100%;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 182, 66, 0.52) rgba(255, 255, 255, 0.035);
}

.order-workspace {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crm-deal-window {
    min-height: 100%;
}

.crm-deal-header {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.crm-deal-avatar,
.crm-message-avatar {
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffe2a3, var(--gold));
    color: #141a22;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(245, 182, 66, 0.16);
}

.crm-deal-avatar {
    width: 42px;
    height: 42px;
    font-size: 12px;
}

.crm-deal-header span {
    display: block;
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.crm-deal-header h2 {
    margin: 3px 0;
    font-size: 18px;
}

.crm-deal-header p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.crm-deal-steps-wrap .deal-steps {
    margin: 0;
}

.liquid-status {
    padding: 10px;
    border: 1px solid rgba(245, 184, 63, 0.15);
    border-radius: 16px;
    background:
        radial-gradient(circle at 15% 50%, rgba(86, 199, 255, 0.08), transparent 28%),
        radial-gradient(circle at 82% 52%, rgba(245, 184, 63, 0.08), transparent 30%),
        rgba(5, 14, 25, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.liquid-status.danger {
    border-color: rgba(255, 117, 117, 0.28);
}

.liquid-status.complete {
    border-color: rgba(53, 214, 159, 0.26);
}

.liquid-status.cancelled {
    opacity: 0.86;
}

.liquid-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.status-left,
.status-right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.status-left {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
}

.live-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #35d69f;
    box-shadow: 0 0 15px rgba(53, 214, 159, 0.8);
}

.liquid-status.danger .live-dot,
.liquid-status.cancelled .live-dot {
    background: #ff7575;
    box-shadow: 0 0 15px rgba(255, 117, 117, 0.65);
}

.status-right {
    justify-content: flex-end;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.status-right b {
    color: #ffe4b8;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.liquid-track {
    position: relative;
    height: 54px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.025));
}

.track-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(53, 214, 159, 0.06), rgba(86, 199, 255, 0.07), rgba(245, 184, 63, 0.08));
}

.liquid-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(53, 214, 159, 0.84), rgba(86, 199, 255, 0.78), rgba(245, 184, 63, 0.92));
    box-shadow: 0 0 34px rgba(86, 199, 255, 0.22), inset 0 1px rgba(255, 255, 255, 0.26);
    transition: width 0.45s ease;
}

.liquid-status.danger .liquid-fill,
.liquid-status.cancelled .liquid-fill {
    background: linear-gradient(90deg, rgba(255, 117, 117, 0.8), rgba(245, 184, 63, 0.7));
}

.liquid-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.28;
    background: linear-gradient(115deg, transparent 0 25%, rgba(255, 255, 255, 0.4) 35%, transparent 45% 100%);
    transform: translateX(-100%);
    animation: liquid-wave 2.6s linear infinite;
}

@keyframes liquid-wave {
    to {
        transform: translateX(100%);
    }
}

.liquid-shine {
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 45%);
    pointer-events: none;
}

.liquid-pulse {
    position: absolute;
    left: 0%;
    top: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: var(--gold);
    box-shadow: 0 0 0 8px rgba(245, 184, 63, 0.12), 0 0 24px rgba(245, 184, 63, 0.62);
    transition: left 0.45s ease;
}

.liquid-status.danger .liquid-pulse,
.liquid-status.cancelled .liquid-pulse {
    background: #ff7575;
    box-shadow: 0 0 0 8px rgba(255, 117, 117, 0.12), 0 0 24px rgba(255, 117, 117, 0.5);
}

.track-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0 18px;
    color: #f6fbff;
    text-shadow: 0 1px 7px rgba(0, 0, 0, 0.5);
}

.stage-icon {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #141a22;
    font-size: 13px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), #ffe2a3);
    box-shadow: 0 0 20px rgba(245, 184, 63, 0.3);
}

.track-content strong,
.track-content em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.track-content strong {
    font-size: 15px;
    font-weight: 900;
}

.track-content em {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.micro-steps {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 9px;
}

.micro-step {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.micro-step.done {
    background: rgba(53, 214, 159, 0.55);
    box-shadow: 0 0 12px rgba(53, 214, 159, 0.16);
}

.micro-step.active {
    background: var(--gold);
    box-shadow: 0 0 14px rgba(245, 184, 63, 0.42);
}

.micro-step.danger-step {
    background: #ff7575;
    box-shadow: 0 0 14px rgba(255, 117, 117, 0.35);
}

.crm-details-fold {
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: rgba(5, 9, 18, 0.18);
    padding: 8px;
}

.crm-details-fold summary {
    cursor: pointer;
    color: #ffe4b8;
    font-size: 13px;
    font-weight: 800;
}

.order-card h2 {
    margin-top: 0;
    font-size: 18px;
    color: #ffe4b8;
}

.order-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.order-head span {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.order-head h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.12;
}

.compact {
    width: auto;
    min-width: 90px;
    margin-top: 0;
    padding: 8px 10px;
}

.stage {
    margin: 0 0 10px;
    border: 1px solid rgba(245, 182, 66, 0.18);
    border-left: 3px solid rgba(245, 182, 66, 0.72);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(245, 182, 66, 0.1), rgba(255, 255, 255, 0.035));
    padding: 9px 11px;
    color: #ffe4b8;
    line-height: 1.35;
}

.deal-duration {
    min-width: 128px;
    border: 1px solid rgba(120, 200, 255, 0.2);
    border-radius: 999px;
    background: rgba(86, 199, 255, 0.08);
    padding: 7px 11px;
    text-align: right;
}

.deal-duration span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.deal-duration b {
    color: #ffe4b8;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.deal-steps {
    display: grid;
    grid-template-columns: repeat(7, minmax(68px, 1fr));
    gap: 6px;
    margin: 8px 0 12px;
}

.deal-steps article {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    min-height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    padding: 7px 8px;
    overflow: hidden;
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.deal-steps article:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 192, 106, 0.32);
}

.deal-steps article.done {
    border-color: rgba(34, 197, 94, 0.24);
    background: rgba(34, 197, 94, 0.1);
}

.deal-steps article.active {
    grid-template-columns: auto minmax(0, 1fr) auto;
    border-color: rgba(245, 192, 106, 0.46);
    background: linear-gradient(135deg, rgba(245, 192, 106, 0.16), rgba(86, 199, 255, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 22px rgba(0, 0, 0, 0.18);
}

.deal-steps article.timer-step {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 54px;
    padding: 6px 7px;
}

.deal-steps article.danger-step {
    border-color: rgba(255, 117, 117, 0.46);
    background: linear-gradient(135deg, rgba(255, 117, 117, 0.18), rgba(245, 192, 106, 0.08));
}

.deal-steps span {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.deal-steps b {
    display: block;
    color: #f6fbff;
    font-size: 11px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.deal-steps em {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
}

.deal-steps em strong {
    display: block;
    color: #ffe4b8;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.countdown-ring {
    width: 44px;
    height: 44px;
    margin: 0 0 0 2px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    align-content: center;
    border: 2px solid rgba(245, 192, 106, 0.72);
    background:
        radial-gradient(circle at center, rgba(10, 14, 24, 0.9) 0 58%, transparent 59%),
        conic-gradient(from -90deg, rgba(245, 192, 106, 0.92), rgba(86, 199, 255, 0.55), rgba(245, 192, 106, 0.18));
    box-shadow: 0 0 24px rgba(245, 192, 106, 0.14);
}

.countdown-ring strong {
    color: #ffe4b8;
    font-size: 11px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-ring small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1;
}

.step-timer {
    display: grid;
    min-width: 0;
    gap: 2px;
    text-align: center;
}

.step-timer strong {
    color: #ffe4b8;
    font-size: 16px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.step-timer small {
    color: var(--muted);
    font-size: 8px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dispute-note {
    border: 1px solid rgba(255, 117, 117, 0.22);
    border-radius: 8px;
    background: rgba(255, 117, 117, 0.08);
    padding: 7px;
}

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

.timer-grid article {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.035);
}

.timer-grid small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 5px;
}

.timer-grid strong {
    color: #ffe4b8;
    font-size: 18px;
    font-variant-numeric: tabular-nums;
}

.timer-grid .timer-hot {
    border-color: rgba(120, 190, 255, 0.28);
    background: rgba(120, 190, 255, 0.08);
}

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

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 12px;
    margin: 8px 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: rgba(5, 9, 18, 0.22);
    padding: 10px;
}

.kv {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 6px;
    margin: 0;
    font-size: 13px;
    line-height: 1.2;
}

.kv.wide {
    grid-column: 1 / -1;
}

.kv b {
    color: var(--gold);
}

.kv span {
    overflow-wrap: anywhere;
}

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

.operator-panel {
    border: 1px solid rgba(245, 192, 106, 0.14);
    border-radius: 12px;
    background: rgba(245, 192, 106, 0.055);
    padding: 10px;
}

.operator-panel h3 {
    margin: 0 0 8px;
    color: #ffe4b8;
    font-size: 14px;
}

.operator-panel .action-panel {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
}

.crm-chat-panel {
    border: 1px solid rgba(120, 190, 255, 0.14);
    border-radius: 12px;
    background: rgba(10, 14, 24, 0.24);
    padding: 10px;
}

.crm-chat-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.crm-chat-title h3 {
    margin: 0;
    color: #ffe4b8;
    font-size: 14px;
}

.crm-chat-title span {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 11px;
}

.crm-chat-feed {
    max-height: 220px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 182, 66, 0.5) rgba(255, 255, 255, 0.035);
}

.crm-chat-feed::-webkit-scrollbar {
    width: 8px;
}

.crm-chat-feed::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
    border-radius: 999px;
}

.crm-chat-feed::-webkit-scrollbar-thumb {
    background: rgba(245, 182, 66, 0.44);
    border-radius: 999px;
}

.crm-message-row {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    margin-bottom: 8px;
}

.crm-message-row.operator {
    justify-content: flex-start;
}

.crm-message-row.client {
    justify-content: flex-end;
}

.crm-message-avatar {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 9px;
    font-size: 8px;
}

.crm-message-stack {
    max-width: min(78%, 430px);
    min-width: 0;
}

.crm-message-label {
    margin: 0 0 3px 4px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
}

.crm-message-label.client-label {
    margin-right: 4px;
    text-align: right;
}

.crm-message-bubble {
    position: relative;
    border-radius: 14px;
    padding: 8px 10px 7px;
    font-size: 13px;
    line-height: 1.36;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.14);
}

.crm-message-bubble.operator-bubble,
.crm-receipt-message {
    border: 1px solid rgba(98, 137, 177, 0.18);
    border-bottom-left-radius: 4px;
    background: linear-gradient(145deg, rgba(26, 48, 76, 0.95), rgba(20, 40, 63, 0.95));
}

.crm-message-bubble.client-bubble {
    border-bottom-right-radius: 4px;
    background: linear-gradient(135deg, var(--gold), #ffd36f);
    color: #141a22;
    font-weight: 800;
}

.crm-message-time {
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    text-align: right;
}

.client-bubble .crm-message-time {
    color: rgba(20, 26, 34, 0.58);
}

.crm-receipt-message {
    padding: 0;
    overflow: hidden;
}

.crm-receipt-title {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(113, 150, 190, 0.14);
}

.crm-receipt-title span {
    display: block;
    color: var(--gold);
    font-size: 9px;
    font-weight: 900;
}

.crm-receipt-title b {
    color: #fff3d6;
}

.crm-receipt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 9px;
}

.crm-receipt-item {
    border: 1px solid rgba(113, 150, 190, 0.14);
    border-radius: 9px;
    background: rgba(6, 16, 28, 0.34);
    padding: 7px 8px;
}

.crm-receipt-item span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 9px;
}

.crm-receipt-item b {
    color: #fff;
    font-size: 12px;
}

.crm-receipt-item.vip {
    border-color: rgba(245, 192, 106, 0.28);
    background: rgba(245, 192, 106, 0.08);
}

.crm-receipt-item.wide,
.crm-receipt-wide {
    grid-column: 1 / -1;
}

.compact-note {
    margin: 0;
    font-size: 13px;
}

button.danger {
    background: #e15f5f;
    color: #fff;
}

.action-panel {
    margin-top: 10px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.action-panel h3 {
    margin: 0 0 8px;
    color: #ffe4b8;
    font-size: 15px;
}

textarea {
    min-height: 74px;
    resize: vertical;
}

@media (max-width: 1180px) {
    body {
        height: auto;
        overflow: auto;
    }

    .content {
        height: auto;
        overflow: visible;
    }

    .crm-shell {
        grid-template-columns: 1fr;
    }

    .board {
        grid-template-columns: 1fr;
        height: auto;
    }

    .board-resizer {
        display: none;
    }

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

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

    .exchange-pair-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    .table-wrap,
    .order-card {
        max-height: initial;
    }
}

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

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .exchange-admin-head {
        align-items: stretch;
        flex-direction: column;
    }

    .exchange-pair-grid {
        grid-template-columns: 1fr;
    }

    .timer-grid {
        grid-template-columns: 1fr;
    }

    .liquid-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .status-right {
        width: 100%;
        justify-content: flex-start;
    }

    .liquid-track {
        height: 64px;
        border-radius: 18px;
    }

    .track-content {
        align-items: flex-start;
        justify-content: center;
        flex-direction: column;
        gap: 3px;
        padding: 9px 14px;
    }

    .stage-icon {
        display: none;
    }

    .deal-steps {
        grid-template-columns: 1fr 1fr;
    }

    .order-head {
        grid-template-columns: 1fr;
    }

    .deal-duration {
        text-align: left;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}
