/* Customer support tickets — portal workspace */

#dashboardTicketsView:not(.hidden) {
    width: 100%;
    order: 1;
}
#dashboardTicketsView.hidden {
    display: none !important;
}

.st-shell {
    max-width: 1080px;
    margin: 0 auto 8px;
    animation: fadeIn 0.22s ease;
}

.st-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 8px 0 18px;
    flex-wrap: wrap;
}
.st-hero h1 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}
.st-hero p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.st-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, 0.7fr)) auto;
    gap: 8px;
    margin-bottom: 14px;
}
.st-toolbar input[type="search"],
.st-toolbar select,
.st-form input[type="text"],
.st-form select,
.st-form textarea {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    padding: 9px 12px;
    outline: none;
    width: 100%;
}
.st-toolbar input[type="search"]:focus,
.st-toolbar select:focus,
.st-form input:focus,
.st-form select:focus,
.st-form textarea:focus {
    border-color: var(--primary);
}

.st-inbox {
    border: 1px solid var(--border-default);
    border-radius: 14px;
    background: var(--bg-secondary);
    overflow: hidden;
}
.st-row {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-muted);
    cursor: pointer;
    text-align: left;
}
.st-row:last-child { border-bottom: 0; }
.st-row:hover { background: var(--bg-hover); }
.st-row-id {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 12px;
    color: var(--text-tertiary);
}
.st-row-title {
    color: var(--text-primary);
    font-weight: 650;
    font-size: 14px;
    unicode-bidi: plaintext;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-row-sub {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-row-flags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.st-row-time { font-size: 12px; color: var(--text-tertiary); white-space: nowrap; }

.st-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}
.st-st-open { color: #58a6ff; background: rgba(88,166,255,.12); border-color: rgba(88,166,255,.22); }
.st-st-in_progress { color: #d29922; background: rgba(210,153,34,.12); border-color: rgba(210,153,34,.25); }
.st-st-waiting_customer { color: #a371f7; background: rgba(163,113,247,.12); border-color: rgba(163,113,247,.25); }
.st-st-resolved { color: #3fb950; background: rgba(63,185,80,.12); border-color: rgba(63,185,80,.22); }
.st-st-closed { color: #8b949e; background: rgba(139,148,158,.12); border-color: rgba(139,148,158,.22); }
.st-pr-low { color: #8b949e; background: rgba(139,148,158,.1); }
.st-pr-normal { color: #58a6ff; background: rgba(88,166,255,.1); }
.st-pr-high { color: #d29922; background: rgba(210,153,34,.12); }
.st-pr-urgent { color: #f85149; background: rgba(248,81,73,.12); }

.st-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    color: var(--text-tertiary);
    font-size: 12px;
}
.st-pager button {
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 6px 12px;
    font-family: inherit;
    cursor: pointer;
}
.st-pager button:disabled { opacity: .4; cursor: default; }

.st-empty {
    padding: 56px 20px;
    text-align: center;
    color: var(--text-secondary);
}
.st-empty h3 { color: var(--text-primary); margin: 0 0 6px; }
.st-error { color: var(--danger-light); font-size: 13px; }

/* Full-page ticket room: under header, only messages scroll */
body.st-chat-open {
    overflow: hidden;
}
body.st-chat-open .dashboard-wrapper {
    height: 100vh;
    overflow: hidden;
}
body.st-chat-open .dashboard-container {
    display: flex;
    flex-direction: column;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
    height: 100%;
    min-height: 0;
}
body.st-chat-open #dashboardHomeStamp {
    display: none !important;
}
body.st-chat-open #dashboardTicketsView:not(.hidden) {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    background: #0d1117;
}

.st-work {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 118px);
    max-width: 980px;
    margin: 0 auto;
    gap: 12px;
    padding-bottom: 8px;
}
body.st-chat-open .st-work {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    max-width: none;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
}
.st-stage {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 276px;
    background: #0d1117;
}
.st-room {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: calc(100vh - 148px);
    position: relative;
    border: 1px solid rgba(48, 54, 61, .9);
    border-radius: 22px;
    overflow: hidden;
    background: #12171e;
    box-shadow:
        0 0 0 1px rgba(255,255,255,.03) inset,
        0 24px 64px rgba(1, 4, 9, .35);
}
body.st-chat-open .st-room {
    min-height: 0;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #0f141b;
}
.st-room-head {
    flex-shrink: 0;
    padding: 8px 18px;
    background: #161b22;
    border-bottom: 1px solid rgba(48, 54, 61, .9);
}
.st-room-head-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 44px;
}
.st-room-head .ds-back {
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
}
.st-room-id { min-width: 0; }
.st-kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .08em;
    color: #8b949e;
    text-transform: uppercase;
    line-height: 1.2;
}
.st-room-id h1 {
    margin: 1px 0 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    unicode-bidi: plaintext;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-aside {
    min-height: 0;
    overflow: auto;
    background: #161b22;
    border-left: 1px solid rgba(48, 54, 61, .9);
}
.st-aside > summary {
    display: none;
    list-style: none;
    cursor: pointer;
}
.st-aside > summary::-webkit-details-marker { display: none; }
.st-aside-body {
    padding: 16px 16px 20px;
}
.st-aside-body h2 {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8b949e;
}
.st-kv { margin: 0; display: grid; gap: 0; }
.st-kv-row {
    display: grid;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(48, 54, 61, .55);
}
.st-kv-row:first-child { padding-top: 0; }
.st-kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.st-kv-row dt {
    font-size: 11px;
    font-weight: 650;
    color: #8b949e;
}
.st-kv-row dd {
    margin: 0;
    font-size: 13px;
    font-weight: 650;
    color: #e6edf3;
    word-break: break-word;
    unicode-bidi: plaintext;
    line-height: 1.4;
}
.st-work-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.st-work-actions .st-timeline {
    position: relative;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(48, 54, 61, .85);
    border-radius: 999px;
    background: rgba(13, 17, 23, .45);
    overflow: visible;
    list-style: none;
}
.st-work-actions .st-timeline summary {
    list-style: none;
    cursor: pointer;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #c9d1d9;
    white-space: nowrap;
}
.st-work-actions .st-timeline summary::-webkit-details-marker { display: none; }
.st-work-actions .st-timeline[open] {
    border-radius: 12px;
    background: #161b22;
}
.st-work-actions .st-timeline #stTimelineBody {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 30;
    width: min(340px, 78vw);
    max-height: 280px;
    overflow: auto;
    margin: 0;
    padding: 4px 0;
    border: 1px solid rgba(48, 54, 61, .95);
    border-radius: 12px;
    background: #161b22;
    box-shadow: 0 16px 40px rgba(1, 4, 9, .45);
}
.st-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin-right: 6px;
    box-shadow: 0 0 8px currentColor;
}
.st-st-in_progress::before,
.st-st-open::before {
    animation: stLive 1.6s ease-in-out infinite;
}
@keyframes stLive {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.st-chat {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    padding: 16px 20px 14px;
    background-color: #0f141b;
    background-image:
        radial-gradient(720px 240px at 0% -10%, rgba(31, 111, 235, .08), transparent 55%),
        radial-gradient(rgba(139, 148, 158, .07) 0.7px, transparent 1px);
    background-size: auto, 20px 20px;
    scrollbar-width: thin;
    scrollbar-color: #30363d transparent;
}
.st-chat::before {
    content: '';
    flex: 1 1 auto;
    min-height: 4px;
}
.st-chat-empty {
    margin: auto;
    padding: 40px 20px !important;
    max-width: 360px;
    border-radius: 18px;
    background: rgba(22, 27, 34, .55);
    border: 1px dashed rgba(48, 54, 61, .9);
}
.st-empty-ico {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #79c0ff;
    background: rgba(56, 139, 253, .12);
    border: 1px solid rgba(56, 139, 253, .22);
}

.st-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: min(86%, 820px);
    position: relative;
}
.st-msg.is-welcome {
    max-width: min(92%, 760px);
    opacity: .96;
}
.st-msg.is-welcome .st-bubble {
    background: rgba(56, 139, 253, .08);
    border-color: rgba(56, 139, 253, .22);
}
.st-live-ping[hidden] { display: none !important; }
.st-live-ping {
    position: absolute;
    left: 50%;
    bottom: 108px;
    transform: translateX(-50%);
    z-index: 8;
    margin: 0;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(56, 139, 253, .38);
    background: #161b22;
    color: #e6edf3;
    font-size: 12px;
    font-weight: 650;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(1, 4, 9, .45);
}
.st-live-ping:hover {
    border-color: rgba(56, 139, 253, .6);
    background: #1c2330;
}
.st-msg.is-staff { align-self: flex-start; }
.st-msg.is-me {
    align-self: flex-end;
    flex-direction: row-reverse;
}
.st-msg-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.st-msg.is-me .st-msg-col { align-items: flex-end; }
.st-avatar {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .02em;
}
.st-avatar.is-staff {
    color: #79c0ff;
    background: linear-gradient(180deg, rgba(56,139,253,.28), rgba(56,139,253,.08));
    border: 1px solid rgba(56, 139, 253, .32);
}
.st-avatar.is-me {
    color: #c9d1d9;
    background: linear-gradient(180deg, #3d444d, #21262d);
    border: 1px solid var(--border-default);
}
.st-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}
.st-bubble {
    position: relative;
    min-width: 160px;
    max-width: 100%;
    padding: 10px 14px 11px;
    border-radius: 14px;
    border: 1px solid transparent;
}
.st-msg.is-staff .st-bubble {
    background: #1c2330;
    border-color: rgba(48, 54, 61, .95);
    border-bottom-left-radius: 4px;
}
.st-msg.is-staff .st-bubble::before {
    content: '';
    position: absolute;
    inset: 8px auto 8px 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #58a6ff;
}
.st-msg.is-me .st-bubble {
    background: #1b4f91;
    border-color: rgba(88, 166, 255, .28);
    border-bottom-right-radius: 4px;
}
.st-msg.is-pending { opacity: .72; }
.st-msg.is-deleted { opacity: 1; }
.st-bubble-deleted {
    background: transparent !important;
    border-style: dashed !important;
    border-color: var(--border-emphasis) !important;
    padding: 8px 12px !important;
    box-shadow: none !important;
}
.st-bubble-deleted::before { display: none !important; }
.st-msg-deleted {
    font-style: italic;
    font-size: 12.5px !important;
    color: var(--text-tertiary) !important;
}
.st-msg-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 0 2px;
}
.st-msg.is-me .st-msg-meta { flex-direction: row-reverse; }
.st-msg-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}
.st-msg.is-staff .st-msg-name { color: #9ecbff; }
.st-msg.is-me .st-msg-name { color: #c9d1d9; }
.st-msg-time {
    font-size: 10.5px;
    color: #7d8590;
    font-variant-numeric: tabular-nums;
}
.st-msg-time em {
    font-style: normal;
    margin-left: 6px;
    color: #8b949e;
}
.st-msg-body {
    color: #e6edf3;
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    unicode-bidi: plaintext;
}
.st-msg.is-staff .st-bubble { padding-left: 16px; }
.st-reply-ref {
    display: flex;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin: 0 0 9px;
    padding: 7px 10px;
    border: 0;
    border-radius: 10px;
    background: rgba(1, 4, 9, .28);
    cursor: pointer;
    text-align: inherit;
    font-family: inherit;
    min-width: 0;
}
.st-msg.is-me .st-reply-ref { background: rgba(1, 4, 9, .22); }
.st-reply-ref-rail {
    width: 3px;
    border-radius: 3px;
    background: #8b949e;
    flex-shrink: 0;
}
.st-msg.is-staff .st-reply-ref-rail { background: #58a6ff; }
.st-msg.is-me .st-reply-ref-rail { background: #79c0ff; }
.st-reply-ref-copy {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
    overflow: hidden;
}
.st-reply-ref-copy strong {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 750;
    color: #c9d1d9;
}
.st-msg.is-staff .st-reply-ref-copy strong { color: #79c0ff; }
.st-msg.is-me .st-reply-ref-copy strong { color: #b6d8ff; }
.st-reply-ref-copy span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #8b949e;
}
.st-reply-ref.is-deleted-ref .st-reply-ref-copy span {
    font-style: italic;
}
.st-reply-ref:hover .st-reply-ref-copy span { color: #d0d7de; }
.st-msg.is-flash .st-bubble {
    box-shadow: 0 0 0 2px rgba(88, 166, 255, .55);
    transition: box-shadow .2s ease;
}

.st-replying {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: 0 2px 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(13, 17, 23, .55);
    border: 1px solid rgba(56, 139, 253, .22);
    min-width: 0;
}
.st-replying[hidden] { display: none !important; }
.st-replying-rail {
    width: 3px;
    border-radius: 3px;
    background: #58a6ff;
    flex-shrink: 0;
}
.st-replying-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.st-replying-copy strong {
    font-size: 12px;
    font-weight: 750;
    color: #79c0ff;
}
.st-replying-copy span {
    font-size: 12px;
    color: var(--text-tertiary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-replying-x {
    width: 28px;
    height: 28px;
    margin-left: auto;
    flex-shrink: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    display: grid;
    place-items: center;
}
.st-replying-x:hover {
    background: var(--bg-tertiary, #21262d);
    color: var(--text-primary);
}

.st-atts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    min-width: 220px;
}
.st-att-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    background: rgba(1, 4, 9, .28);
    border: 1px solid rgba(48, 54, 61, .85);
    border-radius: 12px;
    overflow: hidden;
}
.st-att-card.is-image {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
}
.st-att-card.is-file {
    padding: 8px 8px 8px 10px;
    max-width: 360px;
}
.st-att-ico {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #79c0ff;
    background: rgba(56, 139, 253, .12);
    border: 1px solid rgba(56, 139, 253, .2);
}
.st-att-copy {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 2px;
}
.st-att-copy strong {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #e6edf3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-att-copy span {
    font-size: 11px;
    color: #8b949e;
}
.st-att-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
}
.st-att-dl,
.st-att {
    flex-shrink: 0;
    border: 1px solid rgba(48, 54, 61, .95);
    background: #21262d;
    color: #e6edf3;
    border-radius: 8px;
    padding: 6px 10px;
    font: 650 12px inherit;
    cursor: pointer;
}
.st-att-dl:hover,
.st-att:hover { background: #30363d; }
.st-att-imgwrap {
    display: block;
    position: relative;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: #0d1117;
    cursor: zoom-in;
    min-width: 0;
    max-width: none;
    box-shadow: none;
}

.st-composer {
    position: relative;
    z-index: 15;
    flex-shrink: 0;
    background: #12171e;
    border-top: 1px solid rgba(48, 54, 61, .95);
    padding: 10px 16px 12px;
    box-shadow: 0 -10px 28px rgba(1, 4, 9, .18);
}
.st-typing {
    padding: 0 16px 8px;
    background: #12171e;
}
.st-typing[hidden] { display: none !important; }
.st-typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 7px 12px 7px 8px;
    border-radius: 999px;
    background: #1c2330;
    border: 1px solid rgba(48, 54, 61, .95);
    color: #c9d1d9;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
}
.st-typing-ico {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #79c0ff;
    background: rgba(56, 139, 253, .12);
    flex-shrink: 0;
}
.st-typing-ico svg { width: 13px; height: 13px; }
.st-typing-text { white-space: nowrap; }
.st-typing-dots {
    display: inline-flex;
    gap: 3px;
    margin-inline-start: 2px;
}
.st-typing-dots i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #8b949e;
    animation: stTypingDot 1.1s ease-in-out infinite;
}
.st-typing-dots i:nth-child(2) { animation-delay: .15s; }
.st-typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes stTypingDot {
    0%, 80%, 100% { opacity: .28; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}
.st-composer-closed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
}
.st-composer-closed p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}
.st-composer-box {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 48px;
    background: #0d1117;
    border: 1px solid #3d444d;
    border-radius: 16px;
    padding: 6px;
}
.st-composer-box.is-multi { align-items: flex-end; }
.st-composer-box:focus-within {
    border-color: rgba(56, 139, 253, .7);
    box-shadow: 0 0 0 3px rgba(56, 139, 253, .14);
}
.st-composer-box textarea {
    flex: 1;
    min-height: 36px;
    max-height: 132px;
    width: 100%;
    resize: none;
    display: block;
    background: transparent;
    border: 0;
    margin: 0;
    padding: 8px 10px;
    box-shadow: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    outline: none;
}
.st-composer-box textarea::placeholder {
    color: #8b949e;
    font-weight: 500;
    line-height: 20px;
    opacity: 1;
}
html.lang-ar .st-composer-box textarea,
html[lang="ar"] .st-composer-box textarea {
    font-weight: 500;
    line-height: 20px;
}
.st-composer-box .st-filebtn {
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    justify-content: center;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: #8b949e;
    flex-shrink: 0;
}
.st-composer-box .st-filebtn:hover {
    background: #21262d;
    color: #e6edf3;
}
.st-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #2b7fff, #0969da);
    color: #fff;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(9, 105, 218, .28);
}
.st-send:hover { filter: brightness(1.06); }
.st-send:disabled { opacity: .5; cursor: default; box-shadow: none; }
.st-composer-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    min-height: 22px;
}
.st-composer-hint {
    font-size: 11px;
    color: #6e7681;
    line-height: 1;
}
.st-composer .st-error:empty { display: none; }
.st-filebtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    font-family: inherit;
}
.st-filebtn:hover { color: var(--text-primary); border-color: var(--border-emphasis); }
.st-filebtn input { display: none; }
.st-filechip {
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.st-msg-body .st-link,
.st-bubble-b .st-link {
    color: #79c0ff;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-all;
}
.st-msg.is-me .st-link { color: #a5d6ff; }
.st-edit-area {
    width: 100%;
    min-height: 76px;
    resize: vertical;
    background: rgba(1, 4, 9, .35);
    border: 1px solid var(--border-emphasis);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}
.st-edit-bar {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 8px;
}
.st-edit-btn {
    border: 1px solid var(--border-default);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
}
.st-edit-btn.is-primary {
    background: var(--primary);
    border-color: transparent;
    color: #fff;
}
.st-att-imgwrap {
    display: block;
    position: relative;
    width: 100%;
    padding: 0;
    border: 0;
    overflow: hidden;
    background: #0d1117;
    cursor: zoom-in;
}
.st-att-skel {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 1;
    place-items: center;
    gap: 10px;
    background:
        linear-gradient(110deg, #161b22 8%, #21262d 18%, #161b22 33%);
    background-size: 200% 100%;
    animation: stSkel 1.15s ease infinite;
}
.st-att-imgwrap.is-loading {
    min-height: 148px;
}
.st-att-imgwrap.is-loading .st-att-skel {
    display: grid;
}
.st-att-imgwrap.is-loading .st-att-img {
    opacity: 0;
    position: absolute;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.st-att-skel-ring {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(88, 166, 255, .18);
    border-top-color: #58a6ff;
    animation: stSpin .7s linear infinite;
}
.st-att-skel-bar {
    width: 64%;
    height: 4px;
    border-radius: 99px;
    background: rgba(88, 166, 255, .16);
    overflow: hidden;
}
.st-att-skel-bar > i {
    display: block;
    height: 100%;
    width: 34%;
    border-radius: inherit;
    background: linear-gradient(90deg, #388bfd, #58a6ff);
    animation: stBar 1s ease infinite;
}
.st-att-imgwrap.is-determinate .st-att-skel-bar > i {
    width: 10%;
    animation: none;
    transition: width .18s ease;
}
@keyframes stSkel {
    to { background-position: -200% 0; }
}
@keyframes stSpin { to { transform: rotate(360deg); } }
@keyframes stBar {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}
.st-ctx {
    position: fixed;
    z-index: 4000;
    min-width: 188px;
    padding: 6px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.st-ctx.hidden { display: none !important; }
.st-ctx button {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    color: #e6edf3;
    font: 650 13px inherit;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}
.st-ctx button.is-danger { color: #ff7b72; }
.st-ctx button.is-danger:hover { background: rgba(248, 81, 73, .12); }
.st-imgv {
    position: fixed;
    inset: 0;
    z-index: 3600;
    background: rgba(1,4,9,.86);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}
.st-imgv.hidden { display: none !important; }
body.st-imgv-lock { overflow: hidden; }
.st-imgv-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: #e6edf3;
    font-size: 13px;
    font-weight: 650;
}
.st-imgv-top span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#stImgViewZoom { color: #8b949e; font-variant-numeric: tabular-nums; }
.st-imgv-x {
    width: 36px; height: 36px; border: 0; border-radius: 10px;
    background: #21262d; color: #e6edf3; font-size: 22px; cursor: pointer;
}
.st-imgv-stage {
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: grab;
}
.st-imgv-stage:active { cursor: grabbing; }
.st-imgv-stage img {
    max-width: min(92vw, 1100px);
    max-height: calc(100vh - 160px);
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0,0,0,.45);
    transform-origin: center center;
    transition: transform .08s ease-out;
    user-select: none;
    pointer-events: none;
}
.st-imgv-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border: 0; border-radius: 50%;
    background: rgba(22,27,34,.9);
    color: #e6edf3;
    font-size: 28px;
    cursor: pointer;
}
.st-imgv-nav:disabled { opacity: .25; cursor: default; }
.st-imgv-nav.is-prev { left: 16px; }
.st-imgv-nav.is-next { right: 16px; }
.st-imgv-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px 18px;
}
.st-imgv-bar button {
    min-width: 40px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #30363d;
    border-radius: 10px;
    background: #161b22;
    color: #e6edf3;
    font: 650 13px inherit;
    cursor: pointer;
}
.st-imgv-bar button:hover { background: #21262d; }
.st-att-img {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    background: #0d1117;
}

.st-pend-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 2px;
}
.st-pend-list[hidden] { display: none !important; }
.st-pend {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
    background: #0d1117;
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 6px;
    overflow: hidden;
}
.st-pend.is-img { flex-direction: column; align-items: stretch; padding: 0; }
.st-pend.is-img img {
    width: 160px;
    height: 110px;
    object-fit: cover;
    display: block;
    background: #161b22;
}
.st-pend.is-img .st-pend-meta { padding: 6px 10px 8px; }
.st-pend-ico {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.st-pend-meta { min-width: 0; }
.st-pend-meta strong {
    display: block;
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.st-pend-meta span { font-size: 11px; color: var(--text-tertiary); }
.st-pend-x {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: rgba(1,4,9,.72);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
.st-ghost {
    background: transparent;
    border: 0;
    color: #8b949e;
    border-radius: 8px;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}
.st-ghost:hover { color: #e6edf3; background: rgba(255,255,255,.04); }
.st-ghost:disabled {
    opacity: .45;
    cursor: wait;
    pointer-events: none;
}
.st-composer .st-actions { margin-left: auto; }

.st-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(48, 54, 61, .9);
    border-radius: 14px;
    background: rgba(22, 27, 34, .72);
    overflow: hidden;
}
.st-timeline summary {
    cursor: pointer;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-primary);
}
.st-timeline li {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 8px 14px;
    border-top: 1px solid var(--border-muted);
}

.st-form { display: grid; gap: 12px; }
.st-form label { display: grid; gap: 6px; font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.st-form textarea { min-height: 140px; resize: vertical; }
.st-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.st-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(1,4,9,.72);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 16px 24px;
    overflow: auto;
}
.st-overlay.hidden { display: none !important; }
.st-modal {
    width: min(560px, 100%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 24px 64px rgba(0,0,0,.45);
}
.st-modal h2 { margin: 0 0 16px; font-size: 18px; color: var(--text-primary); }
.st-create {
    width: min(580px, 100%);
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
    background: #161b22;
    border: 1px solid rgba(48, 54, 61, .95);
    box-shadow: 0 28px 80px rgba(1, 4, 9, .55);
}
.st-create-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px 22px 16px;
    background:
        radial-gradient(520px 140px at 0% 0%, rgba(31, 111, 235, .16), transparent 60%),
        #161b22;
    border-bottom: 1px solid rgba(48, 54, 61, .9);
}
.st-create-ico {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #79c0ff;
    background: linear-gradient(180deg, rgba(56,139,253,.28), rgba(56,139,253,.08));
    border: 1px solid rgba(56, 139, 253, .28);
    flex-shrink: 0;
}
.st-create-kicker {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8b949e;
}
.st-create h2 {
    margin: 0 0 6px;
    font-size: 20px;
}
.st-create-lead {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #8b949e;
}
.st-create-form {
    padding: 18px 22px 20px;
    gap: 14px;
}
.st-form .st-create-drop {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px dashed rgba(139, 148, 158, .35);
    border-radius: 14px;
    background: rgba(13, 17, 23, .65);
    cursor: pointer;
    color: inherit;
    font-weight: 500;
}
.st-form .st-create-drop:hover {
    border-color: rgba(56, 139, 253, .55);
    background: rgba(56, 139, 253, .06);
}
.st-create-drop input { display: none; }
.st-create-drop-ico {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #79c0ff;
    background: rgba(56, 139, 253, .12);
    border: 1px solid rgba(56, 139, 253, .22);
}
.st-create-drop-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    text-align: left;
}
.st-create-drop-copy strong {
    font-size: 13px;
    font-weight: 700;
    color: #e6edf3;
}
.st-create-drop-copy small {
    font-size: 12px;
    font-weight: 500;
    color: #8b949e;
    line-height: 1.3;
}
.st-create-drop-btn {
    flex-shrink: 0;
    padding: 7px 12px;
    border-radius: 9px;
    border: 1px solid var(--border-default);
    background: #21262d;
    color: #e6edf3;
    font-size: 12px;
    font-weight: 700;
}
.st-create-foot {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-top: 4px;
}
.st-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.st-skel {
    height: 54px;
    margin: 8px 16px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--bg-tertiary), var(--bg-hover), var(--bg-tertiary));
    background-size: 200% 100%;
    animation: stPulse 1.1s ease infinite;
}
@keyframes stPulse { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

@media (max-width: 960px) {
    .st-stage {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }
    .st-aside {
        grid-row: 1;
        border-left: 0;
        border-bottom: 1px solid rgba(48, 54, 61, .9);
        overflow: visible;
    }
    .st-aside > summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 16px;
        font-size: 13px;
        font-weight: 700;
        color: #c9d1d9;
    }
    .st-aside > summary::after {
        content: '';
        width: 8px;
        height: 8px;
        border-right: 2px solid #8b949e;
        border-bottom: 2px solid #8b949e;
        transform: rotate(45deg);
        margin-top: -4px;
    }
    .st-aside[open] > summary::after { transform: rotate(-135deg); margin-top: 2px; }
    .st-room { grid-row: 2; min-height: 0; }
    .st-live-ping { bottom: 124px; }
}
@media (min-width: 961px) {
    .st-aside .st-aside-body { display: block !important; }
}
@media (max-width: 860px) {
    .st-toolbar { grid-template-columns: 1fr 1fr; }
    .st-toolbar .ds-btn { grid-column: 1 / -1; }
    .st-row { grid-template-columns: 1fr auto; }
    .st-row-id { grid-column: 1 / -1; }
    .st-row-time { display: none; }
    .st-msg { max-width: 94%; }
    .st-form-row { grid-template-columns: 1fr; }
    .st-room { min-height: calc(100vh - 118px); border-radius: 16px; }
    body.st-chat-open .st-room { border-radius: 0; min-height: 0; }
    .st-room-head-top { grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
    .st-work-actions { grid-column: 1 / -1; justify-self: start; }
    .st-room-id h1 { white-space: normal; }
    .st-composer { padding: 10px 12px 12px; }
    .st-composer-hint { display: none; }
}
