:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-2: #f8fbff;
    --ink: #102033;
    --muted: #607089;
    --line: #d8e2f0;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --green: #15803d;
    --red: #dc2626;
    --amber: #d97706;
    --violet: #6d28d9;
    --shadow: 0 18px 48px rgba(16, 32, 51, 0.1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

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

.page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto auto 1fr;
}

.topbar {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 320px;
    align-items: center;
    gap: 20px;
    padding: 18px 34px;
    background:
        linear-gradient(90deg, rgba(5, 35, 76, 0.72), rgba(8, 77, 136, 0.58), rgba(5, 35, 76, 0.72)),
        url("/static/title-bg.png") center / cover no-repeat,
        #0b5594;
    color: #fff;
    box-shadow: 0 14px 34px rgba(16, 32, 51, 0.14);
}

.topbar-logo-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.topbar-seal {
    width: 68px;
    height: 68px;
    object-fit: contain;
    flex: 0 0 auto;
}

.topbar-wordmark {
    width: 198px;
    height: auto;
    object-fit: contain;
    flex: 0 0 auto;
}

.topbar-title {
    display: grid;
    justify-items: center;
    min-width: 0;
    text-align: center;
}

.topbar-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.topbar-logout {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    padding: 10px 16px;
    cursor: pointer;
}

.topbar-logout:hover {
    background: rgba(255, 255, 255, 0.24);
}

.brand-title {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 18, 42, 0.28);
}

.subnav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 18px 28px 0;
}

.navlink {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 10px 12px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(16, 32, 51, 0.05);
}

.navlink.is-active {
    background: #eef4ff;
    border-color: rgba(37, 99, 235, 0.35);
}

.nav-button {
    cursor: pointer;
}

.main {
    width: min(1360px, calc(100% - 48px));
    margin: 0 auto;
    padding: 18px 0 28px;
}

.hero {
    margin-bottom: 18px;
}

.hero-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
}

.hero-copy {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 0;
}

.panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.panel-note {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.panel-body {
    padding: 18px 20px 20px;
}

.section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 16px;
    margin-bottom: 14px;
}

.section:last-child {
    margin-bottom: 0;
}

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

.section-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: #e8eef9;
    color: #35507a;
    font-size: 12px;
    white-space: nowrap;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.field label {
    font-size: 13px;
    font-weight: 700;
    color: #20324c;
}

.input,
.textarea,
.select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 12px;
    outline: none;
}

.textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.65;
}

.input:focus,
.textarea:focus,
.select:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 11px 14px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    border-color: #b8c7df;
}

.btn-primary {
    border-color: transparent;
    background: var(--blue);
    color: #fff;
}

.btn-primary:hover {
    background: var(--blue-dark);
}

.btn-ghost {
    background: #f7faff;
}

.btn-danger {
    border-color: transparent;
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.dropzone {
    display: grid;
    place-items: center;
    min-height: 148px;
    border: 2px dashed #bcc8da;
    border-radius: 8px;
    background: #f8fbff;
    color: var(--muted);
    text-align: center;
    cursor: pointer;
    padding: 16px;
    transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.dropzone:hover,
.dropzone.is-active,
.dropzone.is-dragging {
    border-color: var(--blue);
    background: #eef4ff;
    transform: translateY(-1px);
}

.drop-title {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.drop-copy {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.5;
}

.file-name {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.hidden { display: none !important; }

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 10px;
    background: #eef3fb;
    color: #29405f;
    font-size: 12px;
}

.chip strong {
    font-size: 12px;
}

.result-grid {
    display: grid;
    gap: 12px;
}

.result-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

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

.result-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-neutral { background: #eef2f7; color: #334155; }
.badge-safe { background: #dcfce7; color: #166534; }
.badge-risk { background: #fee2e2; color: #991b1b; }
.badge-warn { background: #ffedd5; color: #9a3412; }

.result-text {
    white-space: pre-wrap;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f8fafc;
    padding: 14px;
    color: #324158;
    font-size: 13px;
    line-height: 1.7;
    min-height: 210px;
    overflow-wrap: anywhere;
}

.list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    font-size: 13px;
}

.list span:last-child {
    color: var(--muted);
    text-align: right;
}

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

.service-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.service-card.is-active {
    background: #eef4ff;
    border-color: rgba(37, 99, 235, 0.35);
}

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

.service-name {
    font-size: 14px;
    font-weight: 700;
}

.service-meta {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 18px;
    align-items: start;
}

.chat-main {
    width: min(1180px, calc(100% - 48px));
}

.chat-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.chat-side {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 16px;
}

.chat-window {
    display: grid;
    grid-template-rows: minmax(380px, 58vh) auto;
    gap: 12px;
    min-width: 0;
}

.message-list {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef4fb;
    padding: 18px;
}

.empty-state {
    display: grid;
    min-height: 100%;
    place-items: center;
    color: var(--muted);
    font-size: 14px;
}

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

.message-own {
    justify-content: flex-end;
}

.message-peer {
    justify-content: flex-start;
}

.message-bubble {
    max-width: min(680px, 78%);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    box-shadow: 0 8px 22px rgba(16, 32, 51, 0.08);
}

.message-own .message-bubble {
    border-color: rgba(37, 99, 235, 0.3);
    background: #eaf2ff;
}

.message-meta,
.message-review,
.message-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}

.message-meta {
    margin-bottom: 8px;
}

.message-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.65;
    font-size: 14px;
}

.message-attach {
    margin-top: 8px;
    color: #335276;
    font-size: 12px;
}

.message-review {
    margin-top: 10px;
}

.message-tags {
    margin-top: 8px;
}

.message-tags span {
    border-radius: 999px;
    background: rgba(96, 112, 137, 0.12);
    padding: 5px 8px;
}

.composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 92px;
    gap: 10px;
    align-items: stretch;
}

.composer-text {
    min-height: 92px;
}

.compact-dropzone {
    min-height: 92px;
    padding: 10px;
}

.send-btn {
    min-height: 92px;
}

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

[data-role="regulator"] {
    background: #eef3f8;
}

[data-role="regulator"] .main {
    width: min(1480px, calc(100% - 48px));
}

.regulator-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    border-bottom: 1px solid rgba(16, 32, 51, 0.08);
    padding-bottom: 14px;
}

.regulator-hero .hero-title {
    color: #102033;
    font-size: 26px;
    font-weight: 800;
}

.regulator-filter-panel {
    box-shadow: 0 10px 28px rgba(16, 32, 51, 0.07);
}

.regulator-table-head {
    align-items: center;
}

.regulator-date-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    padding: 0 12px;
    text-align: left;
    cursor: pointer;
}

.regulator-date-toggle span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.regulator-date-toggle strong {
    min-width: 0;
    overflow: hidden;
    color: #1f2937;
    font-size: 14px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.regulator-date-toggle:hover,
.regulator-date-toggle.is-open {
    border-color: rgba(37, 99, 235, 0.45);
    background: #f8fbff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.regulator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
    margin-top: 18px;
}

.summary-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.stat {
    display: inline-grid;
    gap: 2px;
    min-width: 92px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
    padding: 10px 12px;
}

.stat strong {
    font-size: 18px;
}

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

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.records-table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
    background: #fff;
}

.records-table th,
.records-table td {
    border-bottom: 1px solid var(--line);
    padding: 11px 12px;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
}

.records-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f1f6fd;
    color: #20324c;
    font-weight: 700;
}

.records-table tr[data-index] {
    cursor: pointer;
}

.records-table tr[data-index]:hover {
    background: #f8fbff;
}

.records-table tr[data-audit-index] {
    cursor: pointer;
}

.records-table tr[data-audit-index]:hover {
    background: #f8fbff;
}

.regulator-row-action {
    min-height: 34px;
    padding: 7px 10px;
    white-space: nowrap;
}

.compact-list li {
    cursor: pointer;
}

.compact-list li:hover {
    border-color: rgba(37, 99, 235, 0.35);
    background: #f8fbff;
}

.detail-text {
    min-height: 360px;
}

.regulator-plaintext {
    margin-top: 12px;
    min-height: 180px;
    background: #f7fffb;
    border-color: #cceedd;
}

.regulator-modal {
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.42);
}

.regulator-dialog-panel {
    width: min(1180px, calc(100vw - 40px));
    max-height: calc(100vh - 48px);
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 14px;
    overflow: hidden;
    border: 1px solid rgba(216, 226, 240, 0.9);
    background: #fff;
    padding: 18px;
}

.regulator-audit-dialog-panel {
    width: min(860px, calc(100vw - 40px));
    grid-template-rows: auto minmax(0, 1fr);
}

.regulator-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
}

.regulator-dialog-head h2 {
    margin: 8px 0 0;
    color: #102033;
    font-size: 22px;
    line-height: 1.2;
}

.regulator-dialog-summary {
    margin-bottom: 0;
}

.regulator-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.regulator-dialog-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 14px;
    overflow: hidden;
}

.regulator-dialog-section {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
    padding: 14px;
}

.regulator-dialog-section .result-text,
.regulator-audit-dialog-panel .result-text {
    min-height: 0;
    max-height: none;
    overflow: auto;
    background: #fff;
}

.audit-panel {
    margin-top: 18px;
}

.audit-table {
    min-width: 820px;
}

.audit-detail {
    margin-top: 12px;
    min-height: 220px;
}

.regulator-workspace {
    background: #eef3f8;
}

.regulator-topbar {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr) minmax(240px, 320px);
}

.regulator-topbar .brand-title {
    font-size: 30px;
}

.regulator-topbar-subtitle {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.4;
}

.regulator-account {
    gap: 12px;
}

.regulator-account-name {
    min-width: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.regulator-main {
    display: grid;
    gap: 18px;
    padding-top: 20px;
}

.regulator-command {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 20px;
}

.regulator-command .hero-title {
    font-size: 30px;
    line-height: 1.15;
}

.regulator-command-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

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

.regulator-kpi {
    min-height: 116px;
    border: 1px solid rgba(194, 207, 225, 0.95);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(16, 32, 51, 0.07);
    padding: 16px;
}

.regulator-kpi span,
.regulator-kpi small {
    display: block;
    color: #607089;
    font-size: 12px;
    font-weight: 700;
}

.regulator-kpi strong {
    display: block;
    margin: 10px 0 8px;
    color: #102033;
    font-size: 28px;
    line-height: 1;
}

.regulator-filter-panel .panel-head,
.regulator-records-panel .panel-head,
.audit-panel .panel-head,
.regulator-guidance-panel .panel-head {
    align-items: flex-start;
}

.regulator-filter-grid {
    grid-template-columns: 1.1fr 1fr 0.9fr 1.4fr 0.9fr 0.9fr;
}

.regulator-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
}

.regulator-primary-stack,
.regulator-side-stack {
    display: grid;
    gap: 18px;
    min-width: 0;
}

[data-role="regulator"] .panel,
.regulator-content-grid > *,
.regulator-records-panel,
.audit-panel {
    min-width: 0;
}

.regulator-inline-summary {
    justify-content: flex-end;
    margin: 0;
}

.regulator-table-wrap {
    width: 100%;
    max-width: 100%;
    max-height: min(58vh, 620px);
    overflow: auto;
}

.regulator-records-table {
    min-width: 1160px;
}

.regulator-records-table tbody tr:nth-child(even),
.audit-table tbody tr:nth-child(even) {
    background: #fbfdff;
}

.regulator-records-table td:nth-child(3) {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #475569;
}

.audit-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 14px;
}

.audit-filter-grid .field {
    margin-bottom: 0;
}

.audit-summary {
    margin-top: 4px;
}

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

.regulator-rule-list div {
    display: grid;
    gap: 4px;
    border-left: 3px solid #2563eb;
    background: #f8fbff;
    padding: 10px 12px;
}

.regulator-rule-list div:nth-child(2) {
    border-left-color: #d97706;
}

.regulator-rule-list div:nth-child(3) {
    border-left-color: #dc2626;
}

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

.regulator-rule-list span {
    color: #607089;
    font-size: 13px;
    line-height: 1.55;
}

.regulator-conversation-list {
    max-height: 420px;
    overflow: auto;
}

.regulator-decrypt-control {
    display: grid;
    gap: 8px;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
}

.regulator-decrypt-control[hidden] {
    display: none;
}

.regulator-decrypt-control label {
    color: #20324c;
    font-size: 13px;
    font-weight: 800;
}

.regulator-decrypt-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

body[data-role="regulator"] {
    --g-blue: #1a73e8;
    --g-blue-hover: #1765cc;
    --g-green: #34a853;
    --g-yellow: #fbbc04;
    --g-red: #ea4335;
    --g-ink: #202124;
    --g-muted: #5f6368;
    --g-line: #dadce0;
    --g-soft-line: #e8eaed;
    --g-bg: #f8fafd;
    --g-surface: #ffffff;
    --g-blue-bg: #e8f0fe;
    --g-green-bg: #e6f4ea;
    --g-yellow-bg: #fef7e0;
    --g-red-bg: #fce8e6;
    background: var(--g-bg);
    color: var(--g-ink);
    font-family: "Google Sans", Roboto, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

[data-role="regulator"] .regulator-workspace {
    background: var(--g-bg);
}

[data-role="regulator"] .regulator-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) minmax(190px, 280px);
    min-height: 72px;
    border-bottom: 1px solid var(--g-line);
    background: var(--g-surface);
    color: var(--g-ink);
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}

[data-role="regulator"] .regulator-topbar .topbar-seal {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--g-blue);
    padding: 6px;
}

[data-role="regulator"] .regulator-topbar .topbar-wordmark {
    width: 176px;
    filter: none;
}

[data-role="regulator"] .regulator-topbar .brand-title {
    color: var(--g-ink);
    font-size: 21px;
    font-weight: 600;
    text-shadow: none;
}

[data-role="regulator"] .regulator-topbar-subtitle,
[data-role="regulator"] .regulator-account-name {
    color: var(--g-muted);
}

[data-role="regulator"] .topbar-logout {
    border-color: var(--g-line);
    background: var(--g-surface);
    color: var(--g-blue);
}

[data-role="regulator"] .topbar-logout:hover {
    border-color: #c8d7f4;
    background: var(--g-blue-bg);
}

[data-role="regulator"] .main {
    width: min(1440px, calc(100% - 48px));
}

[data-role="regulator"] .regulator-main {
    gap: 16px;
    padding-top: 22px;
}

[data-role="regulator"] .regulator-command {
    align-items: center;
    border-bottom: 1px solid var(--g-soft-line);
    padding: 4px 0 16px;
}

.regulator-console-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    min-width: 0;
}

.regulator-nav-panel {
    position: sticky;
    top: 94px;
    display: grid;
    gap: 16px;
    min-width: 0;
    border: 1px solid var(--g-line);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.regulator-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    border-bottom: 1px solid var(--g-soft-line);
    padding-bottom: 14px;
}

.regulator-nav-brand strong,
.regulator-live-card strong {
    display: block;
    color: var(--g-ink);
    font-size: 15px;
    font-weight: 600;
}

.regulator-nav-brand small,
.regulator-live-card small {
    display: block;
    color: var(--g-muted);
    font-size: 12px;
    line-height: 1.55;
}

.regulator-google-dots {
    display: grid;
    grid-template-columns: repeat(2, 10px);
    grid-auto-rows: 10px;
    gap: 3px;
    flex: 0 0 auto;
}

.regulator-google-dots i {
    display: block;
    border-radius: 50%;
}

.regulator-google-dots i:nth-child(1) { background: var(--g-blue); }
.regulator-google-dots i:nth-child(2) { background: var(--g-red); }
.regulator-google-dots i:nth-child(3) { background: var(--g-yellow); }
.regulator-google-dots i:nth-child(4) { background: var(--g-green); }

.regulator-nav-links {
    display: grid;
    gap: 6px;
}

.regulator-nav-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    border-radius: 8px;
    color: var(--g-muted);
    padding: 0 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.regulator-nav-links a:hover,
.regulator-nav-links a.is-active {
    background: var(--g-blue-bg);
    color: var(--g-blue);
}

.nav-glyph {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: var(--g-blue);
}

.nav-glyph.is-green { background: var(--g-green); }
.nav-glyph.is-yellow { background: var(--g-yellow); }
.nav-glyph.is-red { background: var(--g-red); }

.regulator-live-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 10px;
    border: 1px solid var(--g-soft-line);
    border-radius: 8px;
    background: #f8fafd;
    padding: 12px;
}

.regulator-live-card small {
    grid-column: 2;
}

.regulator-monitor-stack {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.regulator-command-copy {
    display: grid;
    gap: 6px;
}

.regulator-console-mark {
    color: var(--g-blue);
    font-size: 13px;
    font-weight: 600;
}

[data-role="regulator"] .regulator-command .hero-title {
    color: var(--g-ink);
    font-size: 32px;
    font-weight: 500;
    line-height: 1.2;
}

[data-role="regulator"] .hero-copy,
[data-role="regulator"] .panel-note {
    color: var(--g-muted);
}

[data-role="regulator"] .btn {
    min-height: 40px;
    border-color: var(--g-line);
    border-radius: 8px;
    box-shadow: none;
    font-weight: 500;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

[data-role="regulator"] .btn:hover {
    transform: none;
    border-color: #c8d7f4;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.16);
}

[data-role="regulator"] .btn-primary {
    border-color: var(--g-blue);
    background: var(--g-blue);
    color: #fff;
}

[data-role="regulator"] .btn-primary:hover {
    background: var(--g-blue-hover);
}

[data-role="regulator"] .btn-ghost {
    background: var(--g-surface);
    color: var(--g-blue);
}

[data-role="regulator"] .panel {
    border-color: var(--g-line);
    border-radius: 8px;
    background: var(--g-surface);
    box-shadow: none;
}

[data-role="regulator"] .panel-head {
    padding: 18px 18px 0;
}

[data-role="regulator"] .panel-title {
    color: var(--g-ink);
    font-size: 16px;
    font-weight: 600;
}

[data-role="regulator"] .panel-body {
    padding: 16px 18px 18px;
}

.regulator-status-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.regulator-status-strip > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 10px;
    align-items: center;
    min-height: 58px;
    border: 1px solid var(--g-line);
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
}

.regulator-status-strip strong {
    font-size: 13px;
    font-weight: 600;
}

.regulator-status-strip small {
    grid-column: 2;
    color: var(--g-muted);
    font-size: 12px;
}

[data-role="regulator"] .regulator-kpis {
    gap: 10px;
}

[data-role="regulator"] .regulator-kpi {
    position: relative;
    min-height: 110px;
    overflow: hidden;
    border-color: var(--g-line);
    border-top: 3px solid var(--g-blue);
    background: var(--g-surface);
    box-shadow: none;
}

[data-role="regulator"] .regulator-kpi::after {
    content: "";
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--g-blue-bg);
}

[data-role="regulator"] .regulator-kpi.is-yellow {
    border-top-color: var(--g-yellow);
}

[data-role="regulator"] .regulator-kpi.is-yellow::after {
    background: var(--g-yellow-bg);
}

[data-role="regulator"] .regulator-kpi.is-red {
    border-top-color: var(--g-red);
}

[data-role="regulator"] .regulator-kpi.is-red::after {
    background: var(--g-red-bg);
}

[data-role="regulator"] .regulator-kpi.is-green {
    border-top-color: var(--g-green);
}

[data-role="regulator"] .regulator-kpi.is-green::after {
    background: var(--g-green-bg);
}

[data-role="regulator"] .regulator-kpi.is-multi {
    border-top-color: var(--g-blue);
}

[data-role="regulator"] .regulator-kpi.is-multi::after {
    background: linear-gradient(135deg, var(--g-blue-bg) 0 25%, var(--g-green-bg) 25% 50%, var(--g-yellow-bg) 50% 75%, var(--g-red-bg) 75%);
}

[data-role="regulator"] .regulator-kpi span,
[data-role="regulator"] .regulator-kpi small {
    color: var(--g-muted);
    font-weight: 500;
}

[data-role="regulator"] .regulator-kpi strong {
    color: var(--g-ink);
    font-size: 30px;
    font-weight: 500;
}

.regulator-visual-grid,
.regulator-monitor-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(240px, 0.66fr) minmax(420px, 1.35fr);
    gap: 16px;
    align-items: stretch;
    min-width: 0;
}

.regulator-risk-panel,
.regulator-funnel-panel,
.regulator-flow-panel,
.regulator-flow-map {
    min-width: 0;
}

.regulator-bar-list {
    display: grid;
    gap: 16px;
}

.regulator-bar-row {
    display: grid;
    gap: 8px;
}

.regulator-bar-label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    color: var(--g-ink);
}

.regulator-bar-label strong {
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
}

.regulator-bar-label em {
    color: var(--g-muted);
    font-size: 12px;
    font-style: normal;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--g-blue);
}

.status-dot.is-safe,
.regulator-meter span.is-safe {
    background: var(--g-green);
}

.status-dot.is-warn,
.regulator-meter span.is-warn {
    background: var(--g-yellow);
}

.status-dot.is-risk,
.regulator-meter span.is-risk {
    background: var(--g-red);
}

.regulator-meter {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #f1f3f4;
}

.regulator-meter span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.28s ease;
}

.regulator-flow-map {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr) 32px minmax(0, 1fr) 32px minmax(0, 1fr);
    align-items: center;
    gap: 0;
}

.regulator-flow-node {
    display: grid;
    min-height: 112px;
    align-content: center;
    gap: 7px;
    border: 1px solid var(--g-line);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.regulator-flow-node span {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--g-blue-bg);
    color: var(--g-blue);
    font-size: 12px;
    font-weight: 700;
}

.regulator-flow-node strong {
    font-size: 14px;
    font-weight: 600;
}

.regulator-flow-node small {
    color: var(--g-muted);
    font-size: 12px;
}

.regulator-flow-node.is-yellow span {
    background: var(--g-yellow-bg);
    color: #9a6700;
}

.regulator-flow-node.is-red span {
    background: var(--g-red-bg);
    color: var(--g-red);
}

.regulator-flow-node.is-green span {
    background: var(--g-green-bg);
    color: var(--g-green);
}

.regulator-flow-connector {
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--g-line) 0 8px, transparent 8px 14px);
}

.regulator-funnel {
    display: grid;
    gap: 12px;
}

.regulator-funnel div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: end;
}

.regulator-funnel span {
    grid-column: 1 / -1;
    display: block;
    width: 0;
    height: 18px;
    border-radius: 999px;
    background: var(--g-blue);
    transition: width 0.28s ease;
}

.regulator-funnel div:nth-child(2) span {
    background: var(--g-yellow);
}

.regulator-funnel div:nth-child(3) span {
    background: var(--g-red);
}

.regulator-funnel strong {
    color: var(--g-ink);
    font-size: 22px;
    font-weight: 500;
}

.regulator-funnel small {
    color: var(--g-muted);
    font-size: 12px;
    text-align: right;
}

[data-role="regulator"] .input,
[data-role="regulator"] .select,
[data-role="regulator"] .regulator-date-toggle {
    border-color: var(--g-line);
    background: #fff;
    color: var(--g-ink);
    box-shadow: none;
}

[data-role="regulator"] .input:focus,
[data-role="regulator"] .select:focus,
[data-role="regulator"] .regulator-date-toggle:hover,
[data-role="regulator"] .regulator-date-toggle.is-open {
    border-color: var(--g-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

[data-role="regulator"] .field label,
[data-role="regulator"] .regulator-decrypt-control label {
    color: var(--g-muted);
    font-weight: 600;
}

[data-role="regulator"] .table-wrap {
    border-color: var(--g-line);
}

[data-role="regulator"] .records-table th {
    background: #f8fafd;
    color: var(--g-muted);
    font-size: 12px;
    font-weight: 600;
}

[data-role="regulator"] .records-table th,
[data-role="regulator"] .records-table td {
    border-bottom-color: var(--g-soft-line);
}

[data-role="regulator"] .records-table tr[data-index]:hover,
[data-role="regulator"] .records-table tr[data-audit-index]:hover {
    background: var(--g-blue-bg);
}

[data-role="regulator"] .badge {
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 600;
}

[data-role="regulator"] .badge-neutral {
    background: #f1f3f4;
    color: var(--g-muted);
}

[data-role="regulator"] .badge-safe {
    background: var(--g-green-bg);
    color: #137333;
}

[data-role="regulator"] .badge-warn {
    background: var(--g-yellow-bg);
    color: #9a6700;
}

[data-role="regulator"] .badge-risk {
    background: var(--g-red-bg);
    color: #c5221f;
}

[data-role="regulator"] .stat {
    border-color: var(--g-line);
    background: #fff;
}

.regulator-operation-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.regulator-operation-list li {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    column-gap: 10px;
    padding: 0 0 18px;
}

.regulator-operation-list li:last-child {
    padding-bottom: 0;
}

.regulator-operation-list li::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 18px;
    bottom: 0;
    width: 2px;
    background: var(--g-soft-line);
}

.regulator-operation-list li:last-child::before {
    content: none;
}

.regulator-operation-list li > span {
    grid-row: 1 / span 2;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border: 2px solid var(--g-line);
    border-radius: 50%;
    background: #fff;
}

.regulator-operation-list li.is-active > span {
    border-color: var(--g-blue);
    background: var(--g-blue);
    box-shadow: 0 0 0 4px var(--g-blue-bg);
}

.regulator-operation-list strong {
    font-size: 13px;
    font-weight: 600;
}

.regulator-operation-list small {
    color: var(--g-muted);
    font-size: 12px;
    line-height: 1.5;
}

[data-role="regulator"] .regulator-rule-list div {
    border-left-width: 4px;
    border-radius: 8px;
    background: #fff;
}

[data-role="regulator"] .regulator-rule-list div:nth-child(1) {
    border-left-color: var(--g-green);
}

[data-role="regulator"] .regulator-rule-list div:nth-child(2) {
    border-left-color: var(--g-yellow);
}

[data-role="regulator"] .regulator-rule-list div:nth-child(3) {
    border-left-color: var(--g-red);
}

[data-role="regulator"] .regulator-rule-list span {
    color: var(--g-muted);
}

[data-role="regulator"] .compact-list li {
    border-color: var(--g-line);
    background: #fff;
}

[data-role="regulator"] .compact-list li:hover {
    border-color: #c8d7f4;
    background: var(--g-blue-bg);
}

[data-role="regulator"] .regulator-decrypt-control,
[data-role="regulator"] .regulator-dialog-section {
    border-color: var(--g-line);
    background: #f8fafd;
}

[data-role="regulator"] .regulator-plaintext {
    border-color: #b7dfbf;
    background: #f7fffb;
}

.auth-body,
.cqu-body {
    min-height: 100vh;
    background: #f3f3f3;
}

.auth-body {
    background: #111827;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    padding: 112px 24px 44px;
    background:
        linear-gradient(90deg, rgba(9, 19, 30, 0.78), rgba(25, 42, 50, 0.26), rgba(19, 28, 34, 0.58)),
        linear-gradient(180deg, rgba(255, 129, 82, 0.16), rgba(5, 20, 24, 0.38)),
        url("/static/cqu-login-bg.jpg") center / cover no-repeat;
}

.auth-panel {
    width: 100%;
    min-height: calc(100vh - 156px);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
}

.auth-brand {
    position: fixed;
    top: 28px;
    left: 32px;
    z-index: 2;
    min-height: auto;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.52);
}

.auth-brand-text {
    display: flex;
    align-items: baseline;
    gap: 18px;
    min-width: 0;
    flex-wrap: nowrap;
}

.auth-brand img {
    width: 86px;
    height: 86px;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.45));
}

.auth-school-name {
    margin: 0;
    color: #fff7df;
    font-family: "STXingkai", "华文行楷", "Xingkai SC", KaiTi, STKaiti, serif;
    font-size: 34px;
    line-height: 1.05;
    font-weight: 700;
    white-space: nowrap;
}

.auth-brand h1 {
    margin: 0;
    color: #fffaf1;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: 0;
    font-family: "STKaiti", "华文楷体", KaiTi, "Kaiti SC", serif;
    font-weight: 700;
    white-space: nowrap;
}

.auth-brand p {
    margin: 0;
    line-height: 1.8;
    opacity: 0.9;
}

.auth-card {
    width: min(440px, 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: transparent;
    padding: 36px 34px 32px;
    color: #fffaf1;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.18);
    backdrop-filter: none;
}

.auth-card[hidden] {
    display: none;
}

.auth-card .field label {
    color: rgba(255, 250, 241, 0.9);
}

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

.auth-card .field {
    --auth-label-height: 18px;
    --auth-field-gap: 10px;
    --auth-input-height: 45px;
    position: relative;
    margin-bottom: 0;
    gap: var(--auth-field-gap);
}

.field-error {
    display: none;
    min-height: 18px;
    color: #c2410c;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
    text-align: left;
}

.auth-card .field.has-error .field-error {
    display: block;
}

.auth-card .field.has-error .input {
    border-color: rgba(234, 88, 12, 0.55);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.08);
}

.auth-card .field.has-error .auth-slider-control {
    border-color: rgba(234, 88, 12, 0.72);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.08);
}

.auth-card .input {
    min-height: var(--auth-input-height);
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.84);
    color: #17202a;
}

.auth-card .input:focus {
    border-color: rgba(255, 193, 121, 0.9);
    box-shadow: 0 0 0 3px rgba(255, 163, 76, 0.2);
}

.auth-card .btn-primary {
    background: linear-gradient(135deg, #f4753e, #d04432);
    box-shadow: 0 10px 26px rgba(184, 59, 38, 0.28);
}

.auth-card .btn-primary:hover {
    background: linear-gradient(135deg, #ff8650, #c93c2f);
}

.auth-card .btn-ghost {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.14);
    color: #fffaf1;
}

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

.auth-tabs button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    padding: 11px;
    cursor: pointer;
}

.auth-tabs button.is-active {
    border-color: rgba(18, 150, 219, 0.45);
    background: #eaf6ff;
    color: #086da8;
    font-weight: 700;
}

.auth-submit {
    width: 100%;
    margin-top: 2px;
}

.auth-saved-accounts {
    display: grid;
    gap: 9px;
    margin-bottom: 16px;
}

.auth-saved-accounts[hidden] {
    display: none;
}

.auth-saved-title {
    color: #ffe9cf;
    font-size: 13px;
    font-weight: 700;
}

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

.auth-saved-option {
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.13);
    color: #fffaf1;
    padding: 10px;
    text-align: left;
    cursor: pointer;
}

.auth-saved-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.auth-saved-option small {
    color: rgba(255, 250, 241, 0.76);
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
}

.auth-links button {
    border: 0;
    background: transparent;
    color: #ffe2b8;
    padding: 0;
    font-size: 13px;
    cursor: pointer;
}

.auth-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 10px;
}

.auth-inline .btn {
    padding-left: 10px;
    padding-right: 10px;
    white-space: nowrap;
}

.auth-captcha {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 142px;
    gap: 10px;
    align-items: center;
}

.auth-captcha-image {
    width: 142px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.auth-captcha-image:hover {
    border-color: rgba(255, 226, 184, 0.72);
}

.auth-captcha-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-slider {
    min-height: 46px;
}

.auth-slider[hidden] {
    display: none;
}

.auth-slider-control {
    position: relative;
    height: 46px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
}

.auth-slider-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--slider-progress, 0%);
    background: linear-gradient(135deg, rgba(244, 117, 62, 0.86), rgba(15, 118, 110, 0.86));
    transition: width 0.12s ease;
}

.auth-slider-copy {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 250, 241, 0.9);
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
}

.auth-slider-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
}

.auth-slider-range::-webkit-slider-runnable-track {
    height: 46px;
    background: transparent;
}

.auth-slider-range::-webkit-slider-thumb {
    width: 42px;
    height: 42px;
    margin-top: 2px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #fffaf1;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.18);
    appearance: none;
}

.auth-slider-range::-moz-range-track {
    height: 46px;
    background: transparent;
}

.auth-slider-range::-moz-range-thumb {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #fffaf1;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.18);
}

.auth-slider.is-complete .auth-slider-control {
    border-color: rgba(34, 197, 94, 0.72);
}

.auth-slider.is-complete .auth-slider-copy {
    color: #fff;
}

.cqu-auth-slider .auth-slider-control {
    border-color: #d8e2f0;
    background: #f8fafc;
}

.cqu-auth-slider .auth-slider-copy {
    color: #475569;
}

.cqu-auth-slider.is-complete .auth-slider-copy {
    color: #fff;
}

.sms-slider-dialog {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(3px);
}

.sms-slider-dialog[hidden] {
    display: none;
}

.sms-slider-panel {
    width: min(420px, 100%);
    display: grid;
    gap: 16px;
    border: 1px solid #d8e2f0;
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

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

.sms-slider-head h2 {
    margin: 0;
    color: #17202a;
    font-size: 18px;
    line-height: 1.35;
}

.sms-slider-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.sms-slider-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #334155;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.sms-slider-status {
    min-height: 18px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}

.sms-slider-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sms-slider-actions .btn {
    min-height: 40px;
}

.auth-avatar {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    margin: 0 auto 10px;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: linear-gradient(135deg, #f4753e, #0f766e);
    background-clip: padding-box;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    overflow: hidden;
}

.auth-avatar.is-placeholder {
    position: relative;
    color: transparent;
}

.auth-avatar.has-image {
    background: transparent !important;
    color: transparent;
}

.cqu-avatar.has-image {
    background: transparent !important;
    color: transparent;
}

.auth-avatar.is-placeholder::before,
.auth-avatar.is-placeholder::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 250, 241, 0.94);
}

.auth-avatar.is-placeholder::before {
    width: 30px;
    height: 4px;
}

.auth-avatar.is-placeholder::after {
    width: 4px;
    height: 30px;
}

.auth-avatar-upload:hover .auth-avatar.is-placeholder::before,
.auth-avatar-upload:hover .auth-avatar.is-placeholder::after {
    background: rgba(255, 250, 241, 1);
}

.auth-avatar img,
.cqu-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    transform: scale(1.03);
    transform-origin: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.cqu-self-button > .cqu-avatar img {
    transform: scale(1.1);
}

.auth-avatar-upload {
    display: grid;
    place-items: center;
    cursor: pointer;
    gap: 8px;
    margin-bottom: 4px;
    text-align: center;
}

.auth-avatar-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff4dc;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.auth-avatar-note::before {
    content: '+';
    font-weight: 700;
}

.auth-avatar-upload:hover .auth-avatar-note {
    background: rgba(255, 255, 255, 0.24);
}

.auth-status {
    min-height: 22px;
    margin-top: 12px;
    color: rgba(255, 250, 241, 0.78);
    font-size: 13px;
}

.auth-status.is-error {
    color: #ffb4a8;
}

.auth-status.is-ok {
    color: #bbf7d0;
    font-weight: 700;
}

.auth-dialog {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 28px 18px;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(3px);
}

.auth-dialog[hidden] {
    display: none;
}

.auth-dialog-panel {
    width: min(360px, 100%);
    border: 1px solid rgba(244, 117, 62, 0.16);
    border-radius: 8px;
    background: #fffaf4;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
    padding: 26px 24px 22px;
    text-align: center;
}

.auth-dialog-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(244, 117, 62, 0.12);
    color: #d04432;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.auth-dialog.is-success .auth-dialog-mark {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
}

.auth-dialog.is-success .auth-dialog-panel {
    border-color: rgba(22, 163, 74, 0.22);
}

.auth-dialog-panel h2 {
    margin: 0 0 8px;
    color: #17202a;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.auth-dialog-panel p {
    margin: 0;
    color: #53606f;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
    white-space: pre-line;
}

.auth-dialog-actions {
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

.auth-dialog-panel .btn {
    min-width: 112px;
    min-height: 40px;
    border-radius: 8px;
    box-shadow: none;
}

.auth-hint {
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.cqu-shell {
    height: 100vh;
    display: grid;
    grid-template-columns: 76px 314px minmax(0, 1fr);
    background: #f4f4f4;
    overflow: hidden;
}

.cqu-shell.is-full-main {
    grid-template-columns: 76px minmax(0, 1fr);
}

.cqu-rail {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
    justify-items: center;
    gap: 10px;
    border-right: 1px solid #e1e1e1;
    background: #fafafa;
    padding: 18px 0;
}

.cqu-rail-logo,
.cqu-rail-btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #111;
    font-size: 17px;
    cursor: pointer;
}

.cqu-rail-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cqu-rail-logo {
    background: #1296db;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.cqu-self-button {
    position: relative;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    overflow: hidden;
    cursor: pointer;
}

.cqu-self-button > .cqu-avatar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    font-size: 14px;
}

.cqu-self-button:hover {
    background: transparent;
}

.cqu-settings-btn.is-open,
.cqu-settings-btn:hover {
    background: #ddeaf5;
}

.cqu-rail-btn.is-active {
    background: #e4f2ff;
    color: #1296db;
}

.cqu-rail-btn:hover {
    background: #edf2f7;
}

.cqu-settings-btn {
    margin-bottom: 2px;
    color: #555;
    font-size: 18px;
}

.cqu-presence-dot {
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 13px;
    height: 13px;
    border: 2px solid #fafafa;
    border-radius: 999px;
    background: #9ca3af;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
}

.cqu-presence-dot.is-online,
.cqu-presence-swatch.is-online {
    background: #22c55e;
}

.cqu-presence-dot.is-offline,
.cqu-presence-swatch.is-offline {
    background: #9ca3af;
}

.cqu-rail-spacer {
    align-self: stretch;
    min-height: 10px;
}

.cqu-sidebar {
    border-right: 1px solid #e3e3e3;
    background: #f0f0f0;
    overflow: hidden;
}

.cqu-sidebar[hidden] {
    display: none;
}

.cqu-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 10px;
    padding: 16px 12px 10px;
}

.cqu-search-row.is-chat-tools {
    grid-template-columns: minmax(0, 1fr) 34px;
}

.cqu-search {
    border: 0;
    border-radius: 8px;
    background: #e4e4e4;
    padding: 10px 12px;
    outline: none;
}

.cqu-add {
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: #dedede;
    font-size: 22px;
    cursor: pointer;
}

.cqu-add[hidden] {
    display: none !important;
}

.cqu-add svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cqu-add.is-clear-conversations {
    color: #64748b;
    height: 34px;
    padding: 0;
    font-size: 0;
    line-height: 1;
}

.cqu-add.is-clear-conversations:hover {
    color: #dc2626;
    background: #f3dede;
}

.cqu-add.is-clear-conversations svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.8;
}

.cqu-user-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 16px;
    color: #222;
    cursor: pointer;
}

.cqu-user-card:hover {
    background: #e7e7e7;
}

.cqu-user-card.is-open {
    background: #dfdfdf;
}

.cqu-user-card span:last-child,
.cqu-contact-main > span:last-child {
    color: #8a8a8a;
    font-size: 12px;
}

.cqu-avatar {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background-clip: padding-box;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
}

.cqu-avatar-large {
    width: 52px;
    height: 52px;
    background: #1296db;
}

.cqu-user-menu {
    position: absolute;
    left: 14px;
    right: 14px;
    top: 72px;
    z-index: 20;
    display: grid;
    gap: 4px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.cqu-user-menu-rail {
    left: 68px;
    right: auto;
    top: 14px;
    width: 236px;
}

.cqu-settings-menu {
    left: 68px;
    right: auto;
    top: auto;
    bottom: 14px;
    width: 220px;
}

.cqu-user-menu[hidden] {
    display: none;
}

.cqu-menu-title {
    color: #8a8a8a;
    padding: 8px 10px 2px;
    font-size: 12px;
}

.cqu-profile-summary {
    display: grid;
    gap: 4px;
    border-bottom: 1px solid #ececec;
    padding: 4px 10px 10px;
}

.cqu-profile-summary span {
    color: #777;
    font-size: 12px;
}

.cqu-user-menu button {
    border: 0;
    border-radius: 6px;
    background: transparent;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
}

.cqu-user-menu button:hover {
    background: #f1f5f9;
}

.cqu-user-menu button.is-active {
    background: #eef7ff;
    color: #086da8;
}

.cqu-settings-item {
    display: grid;
    gap: 3px;
    width: 100%;
}

.cqu-settings-item span {
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
}

.cqu-settings-item small {
    color: #7a8797;
    font-size: 12px;
    line-height: 1.4;
}

.cqu-settings-item.is-danger span {
    color: #b91c1c;
}

.cqu-presence-section {
    border-bottom: 1px solid #ececec;
    padding-bottom: 6px;
}

.cqu-presence-options {
    display: grid;
    gap: 2px;
}

.cqu-presence-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cqu-presence-swatch {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.cqu-settings-actions {
    display: grid;
    gap: 4px;
    border-top: 1px solid #ececec;
    margin-top: 4px;
    padding-top: 6px;
}

.cqu-profile-editor-panel {
    width: min(560px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.cqu-profile-picker-panel {
    width: min(520px, 100%);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.cqu-profile-clear-panel {
    width: min(390px, 100%);
}

.cqu-profile-clear-panel p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.cqu-profile-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.cqu-profile-form[hidden] {
    display: none;
}

.cqu-profile-avatar {
    display: grid;
    align-items: center;
    justify-items: center;
    gap: 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    min-height: 0;
    padding: 4px 0 18px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}

.cqu-profile-avatar .cqu-avatar {
    width: 68px;
    height: 68px;
    font-size: 16px;
}

.cqu-profile-editor-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.cqu-profile-section {
    display: grid;
    gap: 0;
    border: 0;
    border-top: 1px solid #edf2f7;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.cqu-profile-editor-hero > .cqu-profile-section {
    border: 0;
}

.cqu-profile-section label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    padding: 14px 0;
}

.cqu-profile-section .cqu-profile-inline-toggle,
.cqu-profile-inline-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    border-top: 1px solid #edf2f7;
    border-radius: 0;
    background: transparent;
    padding: 13px 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.cqu-profile-inline-toggle input {
    accent-color: #1296db;
}

.cqu-profile-picker-section {
    gap: 0;
    background: transparent;
    padding: 0;
}

.cqu-profile-picker-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 16px 0;
    text-align: left;
    cursor: pointer;
}

.cqu-profile-picker-toggle span {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.cqu-profile-picker-toggle strong {
    min-width: 0;
    overflow: hidden;
    color: #1f2937;
    font-size: 15px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-profile-picker-toggle.is-open {
    border-color: rgba(18, 150, 219, 0.46);
    box-shadow: 0 0 0 3px rgba(18, 150, 219, 0.1);
}

.cqu-picker-card {
    display: grid;
    gap: 12px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 14px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.cqu-picker-card[hidden] {
    display: none;
}

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

.cqu-picker-head strong {
    color: #1f2937;
    font-size: 14px;
}

.cqu-picker-close {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #dbe6f3;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.cqu-picker-close:hover {
    background: #f1f5f9;
    color: #1f2937;
}

.cqu-picker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cqu-gps-button {
    border: 1px solid #cfe0f5;
    border-radius: 8px;
    background: #fff;
    color: #2563eb;
    padding: 11px 12px;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
}

.cqu-gps-button:disabled {
    opacity: 0.62;
    cursor: progress;
}

.cqu-wheel-picker {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cqu-wheel-column {
    position: relative;
    height: 148px;
    overflow-y: auto;
    display: grid;
    gap: 0;
    align-content: start;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 52px 8px;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.cqu-wheel-column::before {
    display: none;
}

.cqu-wheel-column::-webkit-scrollbar {
    display: none;
}

.cqu-wheel-column button {
    position: relative;
    z-index: 1;
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    min-height: 44px;
    padding: 0 8px;
    cursor: pointer;
    scroll-snap-align: center;
}

.cqu-wheel-column button:hover {
    background: #eef7ff;
}

.cqu-wheel-column button.is-placeholder {
    color: #94a3b8;
    pointer-events: none;
    scroll-snap-align: none;
}

.cqu-wheel-column button.is-selected,
.cqu-wheel-column button.is-preview {
    background: #eef7ff;
    color: #0f6fa8;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(18, 150, 219, 0.36);
}

.cqu-profile-form input[type="text"],
.cqu-profile-form input[type="tel"],
.cqu-profile-form textarea {
    width: 100%;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 11px 12px;
    outline: none;
}

.cqu-profile-form textarea {
    min-height: 72px;
    resize: vertical;
}

.cqu-profile-form input:focus,
.cqu-profile-form textarea:focus {
    border-color: rgba(18, 150, 219, 0.65);
    box-shadow: 0 0 0 3px rgba(18, 150, 219, 0.12);
}

.cqu-profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cqu-profile-actions button {
    text-align: center;
}

.cqu-profile-visibility {
    display: grid;
    gap: 9px;
    border: 1px solid #e7edf5;
    border-radius: 8px;
    background: #f8fbff;
    padding: 14px;
}

.cqu-profile-visibility > strong {
    grid-column: 1 / -1;
    color: #334155;
    font-size: 13px;
}

.cqu-profile-visibility label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #e4edf8;
    border-radius: 8px;
    background: #fff;
    padding: 10px 12px;
    color: #64748b;
    font-size: 13px;
}

.cqu-profile-visibility input {
    accent-color: #1296db;
}

.cqu-profile-status {
    min-height: 18px;
    color: #64748b;
    font-size: 12px;
    padding-top: 12px;
}

.cqu-profile-status.is-ok {
    color: var(--green);
}

.cqu-profile-status.is-error {
    color: var(--red);
}

.cqu-profile-form > .cqu-modal-actions {
    margin-top: 18px;
    border-top: 1px solid #edf2f7;
    padding-top: 16px;
}

.cqu-account-switch {
    display: grid;
    gap: 12px;
}

.cqu-account-switch[hidden] {
    display: none;
}

.cqu-switch-card {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 13px;
}

.cqu-switch-card span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.cqu-switch-card strong,
.cqu-switch-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-account-option {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
}

.cqu-account-option span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.cqu-account-option strong,
.cqu-account-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-account-option small,
.cqu-switch-empty {
    color: #8a8a8a;
    font-size: 12px;
}

.cqu-switch-empty {
    margin: 0;
    line-height: 1.6;
}

.cqu-account-option.is-active {
    background: #eef7ff;
}

.cqu-avatar-small {
    width: 32px;
    height: 32px;
    font-size: 11px;
}

.cqu-contact-list {
    height: calc(100vh - 60px);
    overflow: auto;
}

.cqu-group-panel {
    display: grid;
    gap: 0;
    padding: 0;
}

.cqu-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 60px;
    padding: 12px 14px;
}

.cqu-group-head strong {
    font-size: 14px;
}

.cqu-group-list,
.cqu-group-detail {
    display: grid;
    gap: 0;
}

.cqu-group-item,
.cqu-group-member {
    border: 0;
    border-radius: 0;
    grid-template-columns: auto minmax(0, 1fr) 64px auto;
}

.cqu-group-avatar {
    background: linear-gradient(135deg, #1296db, #0f766e);
}

.cqu-group-item .cqu-contact-more,
.cqu-group-member .cqu-contact-more {
    opacity: 1;
    pointer-events: none;
}

.cqu-contact {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 64px auto;
    align-items: center;
    gap: 12px;
    border: 0;
    background: transparent;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
}

.cqu-contact:focus-visible {
    outline: 2px solid rgba(18, 150, 219, 0.45);
    outline-offset: -2px;
}

.cqu-contact:hover,
.cqu-contact.is-active {
    background: #dcdcdc;
}

.cqu-contact.is-pinned {
    background: #eef8ff;
    box-shadow: inset 4px 0 0 #1296db;
}

.cqu-contact.is-pinned:hover,
.cqu-contact.is-pinned.is-active {
    background: #dff1fc;
}

.cqu-contact-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "name"
        "preview";
    gap: 3px;
    min-width: 0;
}

.cqu-contact-row {
    grid-area: name;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
}

.cqu-conversation-avatar-wrap {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: fit-content;
}

.cqu-contact-time {
    align-self: center;
    justify-self: center;
    min-width: 46px;
    color: #111827;
    font-size: 13px;
    text-align: center;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
}

.cqu-contact-preview {
    grid-area: preview;
    display: block;
    min-width: 0;
}

.cqu-contact-preview > span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-unread-badge {
    position: absolute;
    right: -3px;
    bottom: -1px;
    display: inline-grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 131, 0.28);
    background: rgba(255, 255, 255, 0.72);
    color: #256383;
    padding: 0 4px;
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(4px);
}

.cqu-contact-more {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    opacity: 0;
}

.cqu-contact:hover .cqu-contact-more,
.cqu-contact:focus-within .cqu-contact-more,
.cqu-contact.is-active .cqu-contact-more {
    opacity: 1;
}

.cqu-contact-more:hover,
.cqu-contact-more:focus-visible {
    background: rgba(15, 23, 42, 0.08);
    color: #1f2937;
    outline: none;
}

.cqu-contact-more svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.cqu-privacy-panel {
    display: grid;
    gap: 8px;
    border-top: 1px solid #ededed;
    border-bottom: 1px solid #ededed;
    margin: 4px 0;
    padding: 8px 0;
}

.cqu-privacy-panel[hidden] {
    display: none !important;
}

.cqu-privacy-panel label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #374151;
    font-size: 13px;
}

.cqu-privacy-panel small {
    min-height: 14px;
    color: #64748b;
    font-size: 11px;
}

.cqu-contact strong,
.cqu-contact span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-conversation-popover {
    position: fixed;
    z-index: 70;
    display: grid;
    gap: 4px;
    width: 136px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.cqu-conversation-popover[hidden] {
    display: none !important;
}

.cqu-action-line {
    width: 100%;
    border: 0;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    padding: 10px 11px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
}

.cqu-action-line:hover {
    background: #eef7ff;
}

.cqu-action-line.is-danger {
    color: #dc2626;
}

.cqu-action-line.is-danger:hover {
    background: #fff1f2;
}

.cqu-workbench {
    height: 100vh;
    overflow: auto;
    background: #f5f5f5;
}

.cqu-workbench-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 86px;
    border-bottom: 1px solid #e4e4e4;
    background: #f7f7f7;
    padding: 18px 26px;
}

.cqu-workbench-head h1 {
    margin: 0;
    font-size: 22px;
}

.cqu-workbench-head p {
    margin: 6px 0 0;
    color: #777;
    font-size: 13px;
}

.cqu-contact-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 8px;
    background: #e8e8e8;
    padding: 4px;
}

.cqu-contact-tabs button {
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #667085;
    padding: 7px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.cqu-contact-tabs button.is-active {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

.cqu-workbench-actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.cqu-contact-page {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0;
    height: calc(100vh - 86px);
    overflow: hidden;
    background: #f0f0f0;
}

.cqu-contact-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 12px;
    padding: 16px 18px 12px;
    background: #f0f0f0;
}

.cqu-contact-search.is-single {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.cqu-contact-search-box {
    position: relative;
    min-width: 0;
}

.cqu-contact-search .cqu-search {
    width: 100%;
    height: 44px;
    font-size: 15px;
}

.cqu-contact-search .cqu-add {
    width: 44px;
    height: 44px;
}

.cqu-contact-search-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(420px, 100%);
    z-index: 35;
    max-height: 280px;
    overflow: auto;
    border: 1px solid #d8e2ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .14);
    padding: 6px;
}

.cqu-contact-search-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    padding: 9px 10px;
    text-align: left;
    cursor: pointer;
}

.cqu-contact-search-item:hover {
    background: #eef7ff;
}

.cqu-contact-search-item > span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.cqu-contact-search-item strong,
.cqu-contact-search-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-contact-search-item strong {
    color: #1f2937;
    font-size: 14px;
}

.cqu-contact-search-item small,
.cqu-contact-search-empty {
    color: #7b8794;
    font-size: 12px;
}

.cqu-contact-search-empty {
    padding: 14px 12px;
    text-align: center;
}

.cqu-contact-page-head {
    border-top: 1px solid #e3e3e3;
    background: #fff;
}

.cqu-contact-directory {
    overflow: auto;
    background: #f0f0f0;
}

.cqu-contact-section {
    display: grid;
    gap: 0;
    padding: 10px 0 8px;
}

.cqu-contact-group-toggle {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    padding: 8px 22px;
    color: #777;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.cqu-contact-group-toggle[disabled],
.cqu-contact-group-toggle.cqu-request-title {
    cursor: default;
}

.cqu-contact-disclosure {
    color: #9aa3ad;
    font-size: 12px;
    line-height: 1;
}

.cqu-contact-group-toggle strong,
.cqu-contact-group-toggle small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-contact-group-toggle small {
    color: #999;
}

.cqu-contact-section.is-collapsed .cqu-contact-group-body {
    display: none;
}

.cqu-contact-card {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 0;
    border-bottom: 1px solid #e3e3e3;
    background: #fff;
    padding: 14px 22px;
    text-align: left;
    cursor: pointer;
}

.cqu-contact-card:hover {
    background: #eef7ff;
}

.cqu-contact-card > span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.cqu-contact-card-copy {
    flex: 1;
}

.cqu-contact-card-head {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.cqu-contact-card strong,
.cqu-contact-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-contact-card strong {
    min-width: 0;
    flex: 0 1 auto;
    font-size: 18px;
    line-height: 1.18;
}

.cqu-contact-card small {
    color: #888;
    font-size: 13px;
}

.cqu-contact-presence-line {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    align-self: center;
    color: #64748b;
    font-size: 12px;
    line-height: 1.2;
    overflow: visible;
    text-overflow: clip;
}

.cqu-contact-presence-line::before,
.cqu-contact-signature::before {
    content: "";
    width: 2px;
    height: 20px;
    flex: 0 0 auto;
    background: #c0c8d2;
    border-radius: 999px;
}

.cqu-contact-presence-line .cqu-presence-swatch {
    width: 7px;
    height: 7px;
}

.cqu-contact-signature {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex: 1 1 auto;
    min-width: 0;
    color: #8a8a8a;
    font-size: 13px;
}

.cqu-search-result {
    min-height: 0;
}

.cqu-search-result-note {
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    padding: 10px 12px;
    font-size: 13px;
}

.cqu-search-result-note.is-error {
    background: #fef2f2;
    color: #b91c1c;
}

.cqu-search-user {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
}

.cqu-search-user .btn {
    flex: 0 0 auto;
    padding: 8px 12px;
}

.cqu-search-user .cqu-avatar,
.cqu-contact-card .cqu-avatar {
    flex: 0 0 auto;
}

.cqu-search-user > span {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.cqu-search-user strong,
.cqu-search-user small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-search-user small {
    color: #64748b;
    font-size: 12px;
}

.cqu-search-user em {
    color: #15803d;
    font-size: 12px;
    font-style: normal;
}

.cqu-request-title {
    cursor: default;
}

.cqu-request-card {
    cursor: default;
}

.cqu-request-card .btn {
    flex: 0 0 auto;
    padding: 8px 14px;
}

.cqu-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.28);
    padding: 24px;
}

.cqu-modal[hidden] {
    display: none;
}

.cqu-modal-panel {
    width: min(460px, 100%);
    display: grid;
    gap: 14px;
    border: 1px solid #d8e2f0;
    border-radius: 8px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 18px 48px rgba(16, 32, 51, 0.18);
}

.cqu-success-panel {
    justify-items: center;
    text-align: center;
    gap: 12px;
}

.cqu-success-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ecfdf5, #dcfce7);
    border: 1px solid #bbf7d0;
    color: #16a34a;
    box-shadow: 0 8px 22px rgba(22, 163, 74, 0.13);
}

.cqu-success-mark svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.cqu-success-panel p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.cqu-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #ececec;
    padding-bottom: 12px;
}

.cqu-modal-head h2 {
    margin: 0;
    font-size: 18px;
}

.cqu-modal-head p {
    margin: 5px 0 0;
    color: #777;
    font-size: 13px;
}

.cqu-modal-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.cqu-dialog-form {
    display: grid;
    gap: 10px;
}

.cqu-dialog-form[hidden],
.cqu-choice-grid[hidden] {
    display: none;
}

.cqu-choice-card[hidden] {
    display: none !important;
}

.cqu-choice-grid {
    display: grid;
    gap: 10px;
}

.cqu-choice-card {
    display: grid;
    gap: 5px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 14px;
    text-align: left;
    cursor: pointer;
}

.cqu-choice-card:hover {
    border-color: rgba(18, 150, 219, 0.45);
    background: #eef7ff;
}

.cqu-choice-card strong {
    color: #1f2937;
    font-size: 15px;
}

.cqu-choice-card small {
    color: #64748b;
    font-size: 12px;
}

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

.cqu-manage-item {
    display: flex;
    align-items: center;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #fff;
    padding: 11px 12px;
    text-align: left;
    cursor: pointer;
}

.cqu-manage-item:hover,
.cqu-manage-item.is-active {
    border-color: rgba(18, 150, 219, 0.45);
    background: #eef7ff;
}

.cqu-manage-item span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.cqu-manage-item strong,
.cqu-manage-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-manage-item small {
    color: #64748b;
    font-size: 12px;
}

.cqu-group-button-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cqu-dialog-form label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.cqu-dialog-form label[hidden] {
    display: none;
}

.cqu-dialog-form input,
.cqu-dialog-form select {
    width: 100%;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    padding: 11px 12px;
    outline: none;
}

.cqu-dialog-form input:focus,
.cqu-dialog-form select:focus {
    border-color: rgba(18, 150, 219, 0.48);
    box-shadow: 0 0 0 3px rgba(18, 150, 219, 0.1);
}

.cqu-chat-group-avatar-field,
.cqu-chat-group-members-field {
    display: grid;
    gap: 8px;
}

.cqu-chat-group-avatar-field > span,
.cqu-field-head > span {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.cqu-chat-group-avatar-field .cqu-avatar {
    border: 1px solid rgba(18, 150, 219, 0.28);
    cursor: pointer;
}

.cqu-chat-group-avatar-field .cqu-avatar:hover {
    box-shadow: 0 0 0 3px rgba(18, 150, 219, 0.1);
}

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

.cqu-field-head small {
    color: #64748b;
    font-size: 12px;
}

.cqu-chat-group-member-list {
    display: grid;
    gap: 6px;
    max-height: 210px;
    overflow: auto;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 8px;
}

.cqu-chat-group-member-option {
    display: grid !important;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 10px !important;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
}

.cqu-chat-group-member-option:hover,
.cqu-chat-group-member-option:has(input:checked) {
    background: #eaf5ff;
}

.cqu-chat-group-member-option input {
    width: 16px;
    height: 16px;
    accent-color: #1296db;
}

.cqu-chat-group-member-option span:last-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.cqu-chat-group-member-option strong,
.cqu-chat-group-member-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-chat-group-member-option small {
    color: #64748b;
    font-size: 12px;
}

.cqu-dialog-status {
    min-height: 18px;
    color: #64748b;
    font-size: 13px;
}

.cqu-dialog-form.is-delete-confirm .cqu-dialog-status {
    display: grid;
    place-items: center;
    min-height: 92px;
    border: 0;
    color: #334155;
    text-align: center;
    font-size: 15px;
    line-height: 1.7;
}

.cqu-dialog-status.is-ok {
    color: #15803d;
}

.cqu-dialog-status.is-error {
    color: #b91c1c;
}

.cqu-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #ececec;
    padding-top: 12px;
}

.cqu-settings-dialog-panel {
    width: min(520px, 100%);
    gap: 16px;
}

.cqu-settings-dialog-body {
    display: grid;
    gap: 12px;
}

.cqu-settings-panel {
    display: grid;
    gap: 14px;
}

.cqu-settings-panel[hidden] {
    display: none;
}

.cqu-settings-action-list {
    display: grid;
    gap: 10px;
}

.cqu-settings-action-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 14px 16px;
    text-align: left;
    cursor: pointer;
}

.cqu-settings-action-card:hover {
    border-color: rgba(18, 150, 219, 0.45);
    background: #eef7ff;
}

.cqu-settings-action-card span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.cqu-settings-action-card strong {
    color: #1f2937;
    font-size: 14px;
}

.cqu-settings-action-card small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

.cqu-settings-action-card em {
    color: #94a3b8;
    font-size: 22px;
    font-style: normal;
}

.cqu-settings-panel label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.cqu-settings-section {
    display: grid;
    gap: 10px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 14px;
}

.cqu-settings-section > strong {
    color: #1f2937;
    font-size: 14px;
}

.cqu-settings-panel input[type="tel"],
.cqu-settings-panel input[type="password"] {
    width: 100%;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    padding: 11px 12px;
    outline: none;
}

.cqu-settings-panel input[type="tel"]:focus,
.cqu-settings-panel input[type="password"]:focus {
    border-color: rgba(18, 150, 219, 0.48);
    box-shadow: 0 0 0 3px rgba(18, 150, 219, 0.1);
}

.cqu-toggle-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 14px;
}

.cqu-toggle-row span {
    display: grid;
    gap: 4px;
}

.cqu-toggle-row strong {
    color: #1f2937;
    font-size: 14px;
}

.cqu-toggle-row small {
    color: #64748b;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}

.cqu-toggle-row input[type="checkbox"] {
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    accent-color: #1296db;
}

.cqu-settings-status {
    min-height: 18px;
    color: #64748b;
    font-size: 13px;
}

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

.cqu-device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 12px;
}

.cqu-device-item span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.cqu-device-item strong {
    color: #1f2937;
    font-size: 14px;
}

.cqu-device-item small {
    min-width: 0;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-device-item em {
    border-radius: 999px;
    background: #e8f2fb;
    color: #256383;
    padding: 4px 9px;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.cqu-settings-confirm p {
    margin: 0;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 16px;
    color: #334155;
    line-height: 1.7;
}

.cqu-profile-dialog-body {
    display: grid;
    gap: 12px;
}

.cqu-profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #dbe6f3;
    border-radius: 8px;
    background: #f8fbff;
    padding: 14px;
}

.cqu-profile-card > span {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.cqu-profile-card .cqu-profile-presence {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    border: 1px solid #dbe6f3;
    border-radius: 999px;
    background: #fff;
    padding: 2px 7px;
}

.cqu-profile-signature-line {
    display: block;
    margin: 2px 0 0;
    border: 0;
    background: transparent;
    padding: 0;
    color: #64748b;
}

.cqu-profile-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cqu-profile-card strong,
.cqu-profile-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-profile-card small,
.cqu-profile-fields span {
    color: #64748b;
    font-size: 12px;
}

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

.cqu-profile-fields div {
    display: grid;
    gap: 4px;
    border: 1px solid #ececec;
    border-radius: 8px;
    padding: 10px 12px;
}

.cqu-group-create-form {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.cqu-group-create-form[hidden] {
    display: none !important;
}

.cqu-group-create-form label {
    display: grid;
    gap: 7px;
    color: #374151;
    font-size: 13px;
}

.cqu-group-create-form input {
    width: 100%;
    min-width: 0;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    padding: 11px 12px;
    outline: none;
}

.cqu-group-create-form input:focus {
    border-color: rgba(18, 150, 219, 0.48);
    box-shadow: 0 0 0 3px rgba(18, 150, 219, 0.1);
}

.cqu-group-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.cqu-group-create-form small {
    min-height: 16px;
    color: #64748b;
    font-size: 12px;
}

.cqu-group-create-form small.is-error {
    color: #b91c1c;
}

.cqu-workbench-tools {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.2fr);
    gap: 12px;
    padding: 18px 26px 0;
}

.cqu-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-width: 0;
}

.cqu-inline-form input,
.cqu-inline-form select {
    min-width: 0;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #fff;
    padding: 11px 12px;
    outline: none;
}

.cqu-inline-form input:focus,
.cqu-inline-form select:focus {
    border-color: rgba(18, 150, 219, 0.48);
    box-shadow: 0 0 0 3px rgba(18, 150, 219, 0.1);
}

#addFriendForm {
    grid-template-columns: 1fr;
}

.cqu-add-friend-form {
    gap: 14px;
}

.cqu-add-friend-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 12px;
    align-items: end;
}

.cqu-add-friend-search label {
    min-width: 0;
}

.cqu-add-friend-search .btn {
    min-height: 50px;
}

#confirmAddFriendBtn {
    justify-self: end;
    min-width: 128px;
}

#confirmAddFriendBtn[hidden] {
    display: none !important;
}

#friendGroupField {
    display: none !important;
}

.cqu-workbench-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
    gap: 0;
    padding: 0;
}

.cqu-workbench-panel {
    min-height: 420px;
    border: 0;
    border-right: 1px solid #e4e4e4;
    border-radius: 0;
    background: #f5f5f5;
    overflow: hidden;
}

.cqu-workbench-panel:last-child {
    border-right: 0;
}

.cqu-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #ededed;
    min-height: 60px;
    padding: 12px 14px;
}

.cqu-panel-note {
    color: #888;
    font-size: 12px;
}

.cqu-stack-list {
    display: grid;
    gap: 0;
    padding: 0;
}

.cqu-stack-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    color: #222;
    text-align: left;
    cursor: pointer;
}

.cqu-stack-item:hover,
.cqu-stack-item.is-active {
    border-color: rgba(18, 150, 219, 0.35);
    background: #eef7ff;
}

.cqu-stack-item > span {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.cqu-stack-item strong,
.cqu-stack-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-stack-item small {
    color: #888;
    font-size: 12px;
}

.cqu-stack-user {
    cursor: default;
}

.cqu-group-detail-view {
    display: grid;
    gap: 10px;
    padding: 0;
}

.cqu-group-section {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.cqu-group-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px;
}

.cqu-group-section-head strong {
    color: #1f2937;
    font-size: 14px;
}

.cqu-group-section-head small {
    color: #64748b;
    font-size: 12px;
}

.cqu-group-request-list {
    display: grid;
    gap: 8px;
}

.cqu-group-request-card {
    gap: 10px;
}

.cqu-group-request-actions,
.cqu-group-member-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.cqu-group-member-actions .btn,
.cqu-group-request-actions .btn {
    white-space: nowrap;
}

.cqu-group-role-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    background: #eef2ff;
    color: #334155;
    padding: 2px 7px;
    font-size: 11px;
    font-style: normal;
    font-weight: 700;
}

.cqu-group-role-badge.is-owner {
    background: #fff7ed;
    color: #9a3412;
}

.cqu-group-role-badge.is-manager {
    background: #e0f2fe;
    color: #075985;
}

.cqu-group-workbench-item,
.cqu-group-workbench-member {
    border-radius: 0;
    grid-template-columns: auto minmax(0, 1fr) 64px auto;
}

.cqu-group-workbench-item .cqu-contact-more,
.cqu-group-workbench-member .cqu-contact-more {
    opacity: 1;
    pointer-events: none;
}

.cqu-group-card {
    display: grid;
    gap: 6px;
    border: 1px solid #dce9f5;
    border-radius: 8px;
    background: #f4f9ff;
    padding: 14px;
}

.cqu-group-card small {
    color: #777;
    overflow-wrap: anywhere;
}

.cqu-main {
    min-width: 0;
    overflow: hidden;
    background: #f5f5f5;
}

.cqu-view[hidden] {
    display: none !important;
}

.cqu-chat,
.cqu-chat-view {
    display: grid;
    grid-template-rows: 86px minmax(0, 1fr) 194px;
    height: 100vh;
    min-width: 0;
    background: #f5f5f5;
}

.cqu-chat-empty-state {
    grid-row: 1 / -1;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 22px;
    height: 100vh;
    background:
        radial-gradient(circle at center, rgba(127, 29, 29, 0.1), transparent 48%),
        #f5f5f5;
    color: rgba(127, 29, 29, 0.72);
}

.cqu-chat-empty-state[hidden] {
    display: none !important;
}

.cqu-chat-empty-state img {
    width: min(54vw, 680px);
    height: auto;
    border-radius: 50%;
    background: rgba(127, 29, 29, 0.12);
    padding: min(5vw, 54px);
    opacity: 0.32;
    filter: grayscale(0.1);
}

.cqu-chat-empty-state strong {
    color: rgba(127, 29, 29, 0.78);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 0.28em;
}

.cqu-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 86px;
    border-bottom: 1px solid #e4e4e4;
    padding: 0 28px;
    background: #f7f7f7;
}

.cqu-chat-head[hidden],
.cqu-message-list[hidden],
.cqu-composer[hidden] {
    display: none !important;
}

.cqu-chat-head h1 {
    margin: 0;
    font-size: 20px;
}

.cqu-chat-peer {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.cqu-chat-peer > .cqu-avatar {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    background: transparent !important;
}

.cqu-chat-peer-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.cqu-chat-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cqu-chat-title-row > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-chat-presence {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    padding: 2px 7px;
    font-size: 12px;
    font-weight: 500;
}

.cqu-chat-presence[hidden] {
    display: none !important;
}

.cqu-chat-head p {
    margin: 4px 0 0;
    color: #8a8a8a;
    font-size: 12px;
    min-height: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-chat-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #777;
    font-size: 12px;
}

.cqu-conversation-no {
    border-radius: 999px;
    background: #ececec;
    padding: 6px 10px;
}

.cqu-status {
    color: #777;
}

.cqu-status.is-ok {
    color: var(--green);
}

.cqu-status.is-error {
    color: var(--red);
    font-weight: 700;
}

.cqu-message-list {
    overflow: auto;
    padding: 18px 72px 22px 24px;
    min-height: 0;
}

.cqu-empty {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 120px;
    color: #9a9a9a;
    font-size: 14px;
}

.cqu-empty-compact {
    min-height: 54px;
    background: #fff;
    border-bottom: 1px solid #e3e3e3;
    font-size: 13px;
}

.cqu-message {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.cqu-message.is-own {
    justify-content: flex-end;
}

.cqu-message.is-own .cqu-bubble-wrap {
    order: 1;
}

.cqu-message.is-own .cqu-message-avatar-btn {
    order: 2;
}

.cqu-message.is-failed {
    align-items: flex-start;
}

.cqu-bubble-wrap {
    max-width: min(560px, 74%);
}

.cqu-message-avatar-btn {
    flex: 0 0 auto;
    align-self: flex-start;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.cqu-message-avatar-btn:hover .cqu-avatar {
    box-shadow: 0 0 0 3px rgba(18, 150, 219, 0.18);
}

.cqu-failed-mark {
    display: inline-grid;
    place-items: center;
    width: 15px;
    height: 15px;
    align-self: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    padding: 0;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.18);
}

.cqu-failed-mark:hover {
    background: #b91c1c;
}

.cqu-failed-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.cqu-failed-row .cqu-failed-mark {
    z-index: 1;
}

.cqu-message.is-failed .cqu-failed-row .cqu-bubble {
    margin-left: 0;
}

.cqu-failed-copy {
    margin-top: 5px;
    color: #b91c1c;
    font-size: 11px;
    font-weight: 600;
    text-align: right;
}

.cqu-message-meta {
    margin-bottom: 5px;
    color: #9a9a9a;
    font-size: 12px;
}

.cqu-message.is-own .cqu-message-meta {
    text-align: right;
}

.cqu-bubble {
    width: fit-content;
    max-width: 100%;
    border-radius: 8px;
    background: #fff;
    padding: 10px 13px;
    font-size: 15px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.cqu-message.is-own .cqu-bubble {
    margin-left: auto;
    background: #c9ebff;
}

.cqu-attach,
.cqu-delivery {
    margin-top: 6px;
    color: #8a8a8a;
    font-size: 12px;
}

.cqu-attach-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    max-width: 100%;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
    color: #1d4ed8;
    padding: 8px 10px;
    text-decoration: none;
}

button.cqu-attach-link {
    cursor: pointer;
    font: inherit;
    text-align: left;
}

button.cqu-attach-link:disabled {
    cursor: wait;
    opacity: 0.72;
}

.cqu-attach-link strong,
.cqu-attach-link small {
    display: block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-attach-link small {
    color: #64748b;
}

.cqu-attach-icon {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 6px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 700;
}

.cqu-message-image-link {
    display: block;
    max-width: min(320px, 100%);
    margin-top: 6px;
}

.cqu-message-image {
    display: block;
    max-width: 100%;
    max-height: 260px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
}

.cqu-delivery {
    text-align: right;
}

.cqu-composer {
    border-top: 1px solid #e1e1e1;
    background: #f7f7f7;
    padding: 12px 24px 14px;
    min-height: 0;
}

.cqu-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    min-height: 34px;
}

.cqu-tool-btn {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
}

.cqu-tool-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cqu-tool-btn:hover,
.cqu-tool-btn.is-active {
    border-color: #cfe5f5;
    background: #eaf6fd;
    color: #0f86c9;
}

.cqu-file-zone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 190px;
    max-width: 390px;
    min-height: 32px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    padding: 5px 8px;
    font-size: 12px;
    cursor: pointer;
}

.cqu-file-zone[hidden] {
    display: none !important;
}

.cqu-file-zone:hover,
.cqu-file-zone.is-dragging {
    border-color: #1296db;
    background: #eef8ff;
}

.cqu-file-zone small {
    min-width: 0;
    max-width: 210px;
    overflow: hidden;
    color: #334155;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cqu-clear-attachment {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.cqu-clear-attachment[hidden] {
    display: none !important;
}

.cqu-emoji-panel {
    position: absolute;
    left: 0;
    bottom: 40px;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(6, 32px);
    gap: 6px;
    border: 1px solid #dbe3ec;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.cqu-emoji-panel[hidden] {
    display: none !important;
}

.cqu-emoji-item {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
}

.cqu-emoji-item:hover {
    background: #eef6ff;
}

.cqu-editor {
    width: 100%;
    height: 82px;
    border: 0;
    background: transparent;
    resize: none;
    outline: none;
    padding: 10px 0;
    font-size: 15px;
    line-height: 1.6;
}

.cqu-editor.is-dragging {
    border-radius: 8px;
    background: #eef8ff;
    box-shadow: inset 0 0 0 2px rgba(18, 150, 219, 0.32);
}

.cqu-screenshot-cropper {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 12px;
    background: rgba(15, 23, 42, 0.82);
    padding: 24px;
}

.cqu-screenshot-cropper[hidden] {
    display: none !important;
}

.cqu-crop-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 0;
    overflow: hidden;
}

.cqu-crop-stage canvas {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    background: #111827;
    cursor: crosshair;
}

.cqu-crop-selection {
    position: absolute;
    border: 2px solid #38bdf8;
    background: rgba(56, 189, 248, 0.16);
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.38);
    pointer-events: none;
}

.cqu-crop-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 8px;
    background: #fff;
    padding: 12px 14px;
}

.cqu-crop-actions span {
    margin-right: auto;
    color: #475569;
    font-size: 13px;
}

.cqu-send-row {
    display: flex;
    justify-content: flex-end;
}

.cqu-send {
    min-width: 118px;
    border: 0;
    border-radius: 8px;
    background: #1296db;
    color: #fff;
    padding: 11px 18px;
    cursor: pointer;
}

.cqu-send:disabled {
    opacity: 0.65;
    cursor: wait;
}

/* Liquid glass chat surface */
.cqu-body {
    --glass-ink: #10233b;
    --glass-muted: #61738a;
    --glass-line: rgba(255, 255, 255, 0.52);
    --glass-line-dark: rgba(60, 86, 112, 0.18);
    --glass-panel: rgba(255, 255, 255, 0.58);
    --glass-panel-strong: rgba(255, 255, 255, 0.76);
    --glass-float: rgba(255, 255, 255, 0.96);
    --glass-panel-soft: rgba(247, 251, 255, 0.42);
    --glass-blue: #1687d9;
    --glass-teal: #0e9f9a;
    --glass-red: #b42332;
    --glass-shadow: 0 24px 70px rgba(29, 55, 82, 0.18);
    --glass-inner: inset 0 1px 0 rgba(255, 255, 255, 0.74),
        inset 0 -1px 0 rgba(255, 255, 255, 0.24);
    background:
        linear-gradient(135deg, rgba(227, 243, 255, 0.9) 0%, rgba(244, 250, 252, 0.82) 34%, rgba(237, 248, 245, 0.86) 66%, rgba(255, 246, 239, 0.9) 100%),
        url("/static/cqu-login-bg.jpg") center / cover fixed no-repeat;
    color: var(--glass-ink);
}

.cqu-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.1) 42%, rgba(255, 255, 255, 0.52)),
        linear-gradient(24deg, rgba(22, 135, 217, 0.12), transparent 46%, rgba(14, 159, 154, 0.13));
}

.cqu-body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent 72%);
}

.cqu-body .cqu-shell {
    gap: 0;
    grid-template-columns: 76px 314px minmax(0, 1fr);
    padding: 0;
    background: transparent;
}

.cqu-body .cqu-shell.is-full-main {
    grid-template-columns: 76px minmax(0, 1fr);
}

.cqu-body .cqu-rail,
.cqu-body .cqu-sidebar,
.cqu-body .cqu-main,
.cqu-body .cqu-chat-head,
.cqu-body .cqu-composer,
.cqu-body .cqu-workbench-head,
.cqu-body .cqu-contact-page,
.cqu-body .cqu-workbench-panel,
.cqu-body .cqu-modal-panel,
.cqu-body .cqu-user-menu,
.cqu-body .sms-slider-panel,
.cqu-body .cqu-conversation-popover,
.cqu-body .cqu-contact-search-panel,
.cqu-body .cqu-emoji-panel {
    border: 1px solid var(--glass-line);
    background: var(--glass-panel);
    box-shadow: var(--glass-shadow), var(--glass-inner);
    backdrop-filter: blur(22px) saturate(1.42);
    -webkit-backdrop-filter: blur(22px) saturate(1.42);
}

.cqu-body .cqu-rail,
.cqu-body .cqu-sidebar,
.cqu-body .cqu-main {
    overflow: hidden;
    border-radius: 0;
}

.cqu-body .cqu-rail {
    border-right: 1px solid var(--glass-line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.36)),
        var(--glass-panel);
    overflow: visible;
    padding: 18px 0;
    z-index: 100;
}

.cqu-body .cqu-sidebar {
    border-right: 1px solid var(--glass-line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(240, 249, 255, 0.42)),
        var(--glass-panel-soft);
}

.cqu-body .cqu-main,
.cqu-body .cqu-chat-view,
.cqu-body .cqu-workbench,
.cqu-body .cqu-contact-page,
.cqu-body .cqu-contact-directory {
    background: transparent;
}

.cqu-body .cqu-main {
    position: relative;
    min-height: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.cqu-body .cqu-main::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.14) 44%, rgba(219, 245, 255, 0.3));
}

.cqu-body .cqu-view {
    position: relative;
    z-index: 1;
}

.cqu-body .cqu-user-menu,
.cqu-body .cqu-conversation-popover,
.cqu-body .cqu-contact-search-panel,
.cqu-body .cqu-emoji-panel {
    background: var(--glass-float);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.2), var(--glass-inner);
    z-index: 1000;
}

.cqu-body .cqu-user-menu *,
.cqu-body .cqu-conversation-popover *,
.cqu-body .cqu-contact-search-panel *,
.cqu-body .cqu-emoji-panel * {
    position: relative;
}

.cqu-body .cqu-chat,
.cqu-body .cqu-chat-view {
    height: 100%;
    min-height: 0;
    background: transparent;
}

.cqu-body .cqu-rail-btn,
.cqu-body .cqu-add,
.cqu-body .cqu-tool-btn,
.cqu-body .cqu-modal-close,
.cqu-body .sms-slider-close,
.cqu-body .cqu-picker-close,
.cqu-body .cqu-contact-more,
.cqu-body .cqu-action-line,
.cqu-body .btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64), 0 8px 24px rgba(31, 57, 84, 0.08);
    backdrop-filter: blur(14px) saturate(1.25);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
}

.cqu-body .cqu-rail-btn:hover,
.cqu-body .cqu-settings-btn.is-open,
.cqu-body .cqu-tool-btn:hover,
.cqu-body .cqu-tool-btn.is-active,
.cqu-body .cqu-add:hover,
.cqu-body .cqu-contact-more:hover,
.cqu-body .cqu-action-line:hover,
.cqu-body .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.76);
    color: #075985;
}

.cqu-body .cqu-rail-btn.is-active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(220, 244, 255, 0.58));
    color: var(--glass-blue);
    box-shadow: 0 14px 32px rgba(22, 135, 217, 0.18), var(--glass-inner);
}

.cqu-body .cqu-presence-dot {
    border-color: rgba(255, 255, 255, 0.8);
}

.cqu-body .cqu-search,
.cqu-body .cqu-editor,
.cqu-body .cqu-dialog-form input,
.cqu-body .cqu-dialog-form select,
.cqu-body .cqu-profile-form input[type="text"],
.cqu-body .cqu-profile-form input[type="tel"],
.cqu-body .cqu-profile-form textarea,
.cqu-body .cqu-settings-panel input[type="tel"],
.cqu-body .cqu-settings-panel input[type="password"] {
    border: 1px solid rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.42);
    color: var(--glass-ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cqu-body .cqu-search:focus,
.cqu-body .cqu-dialog-form input:focus,
.cqu-body .cqu-dialog-form select:focus,
.cqu-body .cqu-profile-form input:focus,
.cqu-body .cqu-profile-form textarea:focus,
.cqu-body .cqu-settings-panel input[type="tel"]:focus,
.cqu-body .cqu-settings-panel input[type="password"]:focus {
    border-color: rgba(22, 135, 217, 0.56);
    box-shadow: 0 0 0 3px rgba(22, 135, 217, 0.12), var(--glass-inner);
}

.cqu-body .cqu-contact-list,
.cqu-body .cqu-message-list,
.cqu-body .cqu-contact-directory,
.cqu-body .cqu-workbench,
.cqu-body .cqu-modal-panel,
.cqu-body .cqu-chat-group-member-list {
    scrollbar-color: rgba(82, 111, 139, 0.36) transparent;
}

.cqu-body .cqu-contact-list::-webkit-scrollbar,
.cqu-body .cqu-message-list::-webkit-scrollbar,
.cqu-body .cqu-contact-directory::-webkit-scrollbar,
.cqu-body .cqu-workbench::-webkit-scrollbar,
.cqu-body .cqu-modal-panel::-webkit-scrollbar,
.cqu-body .cqu-chat-group-member-list::-webkit-scrollbar {
    width: 10px;
}

.cqu-body .cqu-contact-list::-webkit-scrollbar-thumb,
.cqu-body .cqu-message-list::-webkit-scrollbar-thumb,
.cqu-body .cqu-contact-directory::-webkit-scrollbar-thumb,
.cqu-body .cqu-workbench::-webkit-scrollbar-thumb,
.cqu-body .cqu-modal-panel::-webkit-scrollbar-thumb,
.cqu-body .cqu-chat-group-member-list::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(82, 111, 139, 0.34);
    background-clip: content-box;
}

.cqu-body .cqu-contact {
    margin: 0;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.cqu-body .cqu-contact:hover,
.cqu-body .cqu-contact.is-active {
    border-color: rgba(255, 255, 255, 0.56);
    background: rgba(255, 255, 255, 0.42);
    box-shadow: 0 14px 34px rgba(31, 57, 84, 0.1), var(--glass-inner);
}

.cqu-body .cqu-contact.is-pinned {
    border-color: rgba(22, 135, 217, 0.28);
    background: rgba(226, 246, 255, 0.54);
    box-shadow: inset 4px 0 0 rgba(22, 135, 217, 0.72), 0 12px 28px rgba(22, 135, 217, 0.12);
}

.cqu-body .cqu-contact-time,
.cqu-body .cqu-contact-preview,
.cqu-body .cqu-panel-note,
.cqu-body .cqu-modal-head p,
.cqu-body .cqu-chat-head p,
.cqu-body .cqu-message-meta,
.cqu-body .cqu-settings-item small,
.cqu-body .cqu-contact-card small,
.cqu-body .cqu-contact-group-toggle,
.cqu-body .cqu-contact-search-item small {
    color: var(--glass-muted);
}

.cqu-body .cqu-avatar {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 26px rgba(31, 57, 84, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.cqu-body .cqu-chat-head {
    min-height: 86px;
    border-width: 0 0 1px;
    border-color: rgba(255, 255, 255, 0.44);
    background: rgba(255, 255, 255, 0.52);
}

.cqu-body .cqu-chat-peer > .cqu-avatar:not(.has-image) {
    background: linear-gradient(135deg, var(--glass-blue), var(--glass-teal)) !important;
    color: #fff;
}

.cqu-body .cqu-chat-presence,
.cqu-body .cqu-conversation-no,
.cqu-body .cqu-unread-badge {
    border: 1px solid rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.48);
    box-shadow: var(--glass-inner);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.cqu-body .cqu-message-list {
    padding: 18px 72px 22px 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
        transparent;
}

.cqu-body .cqu-bubble {
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 14px 34px rgba(31, 57, 84, 0.13), var(--glass-inner);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.cqu-body .cqu-message.is-own .cqu-bubble {
    background: linear-gradient(135deg, rgba(205, 238, 255, 0.82), rgba(209, 247, 239, 0.68));
    border-color: rgba(255, 255, 255, 0.66);
    box-shadow: 0 16px 38px rgba(22, 135, 217, 0.16), var(--glass-inner);
}

.cqu-body .cqu-attach-link,
.cqu-body .cqu-file-zone,
.cqu-body .cqu-message-image,
.cqu-body .cqu-search-result-note,
.cqu-body .cqu-search-user,
.cqu-body .cqu-choice-card,
.cqu-body .cqu-manage-item,
.cqu-body .cqu-settings-action-card,
.cqu-body .cqu-profile-visibility,
.cqu-body .cqu-profile-visibility label,
.cqu-body .cqu-picker-card,
.cqu-body .cqu-wheel-column,
.cqu-body .cqu-contact-card,
.cqu-body .cqu-stack-item,
.cqu-body .cqu-group-card,
.cqu-body .cqu-chat-group-member-list {
    border: 1px solid rgba(255, 255, 255, 0.56);
    background: rgba(255, 255, 255, 0.46);
    box-shadow: var(--glass-inner);
    backdrop-filter: blur(16px) saturate(1.24);
    -webkit-backdrop-filter: blur(16px) saturate(1.24);
}

.cqu-body .cqu-contact-card:hover,
.cqu-body .cqu-contact-search-item:hover,
.cqu-body .cqu-choice-card:hover,
.cqu-body .cqu-manage-item:hover,
.cqu-body .cqu-manage-item.is-active,
.cqu-body .cqu-stack-item:hover,
.cqu-body .cqu-stack-item.is-active,
.cqu-body .cqu-settings-action-card:hover,
.cqu-body .cqu-chat-group-member-option:hover,
.cqu-body .cqu-chat-group-member-option:has(input:checked) {
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 12px 30px rgba(31, 57, 84, 0.12), var(--glass-inner);
}

.cqu-body .cqu-composer {
    border-width: 1px 0 0;
    border-color: rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.56);
}

.cqu-body .cqu-toolbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.42);
    padding-bottom: 8px;
}

.cqu-body .cqu-editor {
    min-height: 78px;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.cqu-body .cqu-send,
.cqu-body .btn-primary {
    border: 1px solid rgba(255, 255, 255, 0.56);
    background: linear-gradient(135deg, rgba(22, 135, 217, 0.92), rgba(14, 159, 154, 0.86));
    box-shadow: 0 14px 32px rgba(22, 135, 217, 0.22), var(--glass-inner);
}

.cqu-body .cqu-send:hover,
.cqu-body .btn-primary:hover {
    filter: saturate(1.08) brightness(1.03);
}

.cqu-body .cqu-chat-empty-state {
    height: 100%;
    background: transparent;
    color: rgba(16, 35, 59, 0.7);
}

.cqu-body .cqu-chat-empty-state img {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 70px rgba(31, 57, 84, 0.1), var(--glass-inner);
    filter: brightness(0) saturate(100%) invert(23%) sepia(23%) saturate(780%) hue-rotate(172deg) brightness(88%) contrast(88%);
    opacity: 0.42;
}

.cqu-body .cqu-chat-empty-state strong {
    color: rgba(32, 52, 74, 0.82);
    text-shadow: 0 2px 18px rgba(255, 255, 255, 0.72);
}

.cqu-body .cqu-modal {
    background: rgba(21, 35, 51, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cqu-body .cqu-modal-head,
.cqu-body .cqu-modal-actions,
.cqu-body .cqu-profile-form > .cqu-modal-actions,
.cqu-body .cqu-profile-section,
.cqu-body .cqu-profile-inline-toggle,
.cqu-body .cqu-settings-actions,
.cqu-body .cqu-profile-summary {
    border-color: rgba(255, 255, 255, 0.48);
}

.cqu-body .cqu-profile-avatar,
.cqu-body .cqu-profile-section,
.cqu-body .cqu-profile-picker-toggle,
.cqu-body .cqu-profile-inline-toggle {
    background: transparent;
}

.cqu-body .sms-slider-dialog {
    background: rgba(21, 35, 51, 0.22);
}

.footer-space {
    height: 8px;
}

.auth-icp-link,
.auth-icp-link:link,
.auth-icp-link:visited,
.auth-icp-link:hover,
.auth-icp-link:active,
.auth-icp-link:focus {
    display: block;
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 2;
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    transform: translateX(-50%);
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .service-grid,
    .split,
    .chat-layout,
    .regulator-grid,
    .regulator-visual-grid,
    .regulator-monitor-grid,
    .regulator-console-shell,
    .regulator-content-grid,
    .regulator-dialog-grid,
    .filter-grid,
    .regulator-filter-grid,
    .cqu-workbench-tools,
    .cqu-workbench-grid,
    .composer {
        grid-template-columns: 1fr;
    }

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

    .regulator-command,
    .audit-filter-grid {
        grid-template-columns: 1fr;
    }

    .regulator-command-actions {
        justify-content: flex-start;
    }

    .regulator-nav-panel {
        position: static;
    }

    .regulator-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .regulator-flow-map {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .regulator-flow-connector {
        width: 2px;
        height: 22px;
        justify-self: 28px;
    }

    #addFriendForm {
        grid-template-columns: 1fr;
    }

    .send-btn,
    .compact-dropzone {
        min-height: auto;
    }

    .auth-panel {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: 260px;
    }

    .cqu-shell {
        grid-template-columns: 68px 260px minmax(0, 1fr);
    }

    .cqu-body .cqu-shell {
        grid-template-columns: 68px 260px minmax(0, 1fr);
        gap: 0;
        padding: 0;
    }

    .cqu-message-list {
        padding-right: 24px;
    }

    .cqu-body .cqu-message-list {
        padding-right: 24px;
    }
}

@media (max-width: 780px) {
    .topbar {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 12px;
        padding: 18px 16px;
    }

    .topbar-logo-group {
        justify-content: center;
    }

    .topbar-seal {
        width: 52px;
        height: 52px;
    }

    .topbar-wordmark {
        width: 160px;
    }

    .topbar-spacer {
        display: none;
    }

    .topbar-actions {
        justify-content: center;
    }

.topbar-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.topbar-logout {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    padding: 10px 16px;
    cursor: pointer;
}

.topbar-logout:hover {
    background: rgba(255, 255, 255, 0.24);
}

    .brand-title {
        font-size: 24px;
        line-height: 1.18;
    }

    .brand-title {
        white-space: normal;
    }

    .regulator-topbar .brand-title {
        font-size: 23px;
    }

    [data-role="regulator"] .regulator-topbar {
        position: relative;
        grid-template-columns: 1fr;
        justify-items: center;
    }

    [data-role="regulator"] .regulator-topbar .topbar-wordmark {
        width: 150px;
    }

    .regulator-account {
        justify-content: center;
        width: 100%;
    }

    .regulator-command .hero-title {
        font-size: 24px;
    }

    .regulator-kpis {
        grid-template-columns: 1fr;
    }

    .regulator-kpi {
        min-height: 92px;
    }

    .regulator-status-strip {
        grid-template-columns: 1fr;
    }

    .regulator-nav-panel {
        padding: 14px;
    }

    .regulator-flow-node {
        min-height: 90px;
    }

    .regulator-decrypt-row,
    .regulator-command-actions {
        grid-template-columns: 1fr;
    }

    .regulator-command-actions {
        display: grid;
        width: 100%;
    }

    .regulator-command-actions .btn,
    .regulator-decrypt-row .btn {
        width: 100%;
    }

    .main {
        width: min(1360px, calc(100% - 24px));
    }

    [data-role="regulator"] .main {
        width: min(1480px, calc(100% - 24px));
    }

    .regulator-dialog-panel {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        padding: 14px;
    }

    .regulator-dialog-head {
        align-items: flex-start;
    }

    .regulator-dialog-actions {
        justify-content: stretch;
    }

    .regulator-dialog-actions .btn {
        width: 100%;
    }

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

    .panel-head,
    .panel-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .auth-page {
        padding: 14px;
    }

    .auth-brand {
        min-height: auto;
        align-items: flex-start;
        padding: 22px;
    }

    .auth-brand h1 {
        font-size: 24px;
    }

    .cqu-shell {
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
    }

    .cqu-body .cqu-shell,
    .cqu-body .cqu-shell.is-full-main {
        min-height: 100vh;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }

    .cqu-rail {
        display: flex;
        position: relative;
        align-items: center;
        justify-content: space-between;
        padding: 10px 12px;
        border-right: 0;
        border-bottom: 1px solid #e1e1e1;
    }

    .cqu-body .cqu-rail {
        border-right: 0;
        border-bottom: 1px solid var(--glass-line);
    }

    .cqu-user-menu-rail {
        left: 12px;
        top: 58px;
    }

    .cqu-settings-menu {
        left: auto;
        right: 12px;
        top: 58px;
        bottom: auto;
    }

    .cqu-rail-spacer {
        flex: 1;
    }

    .cqu-sidebar {
        max-height: 320px;
        border-right: 0;
        border-bottom: 1px solid #e3e3e3;
    }

    .cqu-body .cqu-sidebar {
        max-height: 320px;
        border-right: 0;
        border-bottom: 1px solid var(--glass-line);
    }

    .cqu-contact-list {
        height: 190px;
    }

    .cqu-chat {
        min-height: 680px;
        grid-template-rows: 96px minmax(320px, 1fr) 194px;
    }

    .cqu-body .cqu-chat,
    .cqu-body .cqu-chat-view {
        height: auto;
        min-height: 680px;
        grid-template-rows: 96px minmax(320px, 1fr) 194px;
    }

    .cqu-chat-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }

    .cqu-bubble-wrap {
        max-width: 86%;
    }

    .cqu-body .cqu-message-list {
        padding: 18px 14px 22px;
    }
}

@media (max-width: 1100px) {
    .auth-panel {
        min-height: calc(100vh - 156px);
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: auto;
    }
}

@media (max-width: 780px) {
    .auth-page {
        padding: 96px 14px 28px;
        background-position: 38% center;
    }

    .auth-panel {
        min-height: calc(100vh - 124px);
    }

    .auth-brand {
        top: 18px;
        left: 18px;
        align-items: center;
        padding: 0;
    }

    .auth-brand img {
        width: 64px;
        height: 64px;
    }

    .auth-school-name {
        font-size: 22px;
    }

    .auth-brand h1 {
        font-size: 20px;
    }

    .auth-brand-text {
        gap: 12px;
    }

    .auth-card {
        padding: 24px 22px 22px;
    }

    .auth-avatar {
        width: 82px;
        height: 82px;
        font-size: 24px;
    }

    .auth-inline {
        grid-template-columns: 1fr;
    }

    .auth-captcha {
        grid-template-columns: 1fr;
    }

    .auth-captcha-image {
        width: 100%;
    }

    .cqu-modal {
        padding: 14px;
    }

    .cqu-profile-editor-hero,
    .cqu-profile-visibility {
        grid-template-columns: 1fr;
    }

    .cqu-profile-form {
        grid-template-columns: 1fr;
    }

    .cqu-profile-avatar {
        min-height: 0;
    }

    .cqu-profile-fields {
        grid-template-columns: 1fr;
    }

}
