﻿: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: 320px 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;
}

.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;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 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;
}

.board {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 10px;
    height: calc(100vh - 92px);
    min-height: 0;
}

.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;
}

.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.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;
}

.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-chat-message {
    max-width: 86%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    padding: 8px 10px;
}

.crm-chat-message.client {
    align-self: flex-start;
    border-color: rgba(86, 199, 255, 0.18);
    background: rgba(86, 199, 255, 0.09);
}

.crm-chat-message.operator {
    align-self: flex-end;
    border-color: rgba(245, 192, 106, 0.2);
    background: rgba(245, 192, 106, 0.1);
}

.crm-chat-message.system {
    align-self: center;
    max-width: 100%;
    color: var(--muted);
}

.crm-chat-message.order-summary {
    align-self: stretch;
    max-width: 100%;
    border-color: rgba(245, 192, 106, 0.24);
    background: linear-gradient(135deg, rgba(245, 192, 106, 0.12), rgba(86, 199, 255, 0.07));
    color: #fff;
}

.crm-chat-message b {
    display: block;
    color: #fff3d6;
    font-size: 12px;
    margin-bottom: 4px;
}

.crm-chat-message p {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.35;
}

.crm-chat-message small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 10px;
}

.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;
    }

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

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

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

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

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

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

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

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