

.chat-page {
    min-height: 100vh;
    padding: 2px;
    max-width: 75%;
    margin: 0 auto;
}

.chat-shell {

    margin: 0 auto;
    background: var(--bg);
    border: 1px solid #4a4a4a;

    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    background: linear-gradient(180deg, #2c2c2c 0%, #232323 100%);
    border-bottom: 1px solid #3f3f3f;
}



.chat-subtitle {
    color: var(--muted);
    margin-top: 5px;
    font-size: 14px;
}



.chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 5px;
    padding: 2px;
}

.chat-main-panel,
.chat-sidebar-box {
    background: var(--panel);

    /*border-radius: 16px;*/

}

.chat-main-panel {

}

.chat-board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 6px 6px 14px 6px;
}

.chat-board-title,
.chat-sidebar-title {
    color: var(--accent);
    font-size: 20px;
    font-weight: bold;
}

.chat-board-note {
    color: var(--muted);
    font-size: 13px;
}

.chat-board {
    height: 520px;
    overflow-y: auto;
    padding: 14px;
    /*border-radius: 14px;*/
    background: #303030;
    border: 1px solid #454545;
}

.chat-board::-webkit-scrollbar {
    width: 10px;
}

.chat-board::-webkit-scrollbar-thumb {
    background: #5b5b5b;
    border-radius: 20px;
}

.chat-line {
    margin-bottom: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.04);
    border-radius: 14px;
}

.chat-line-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 0px;
    flex-wrap: wrap;
}

.chat-line-time,
.chat-line-system-time {
    color: #9f9f9f;
    font-size: 12px;
}

.chat-line-user {
    color: var(--accent);
    font-weight: bold;
    font-size: 15px;
}

.chat-line-text {
    color: #fff;
    line-height: 1.45;
    word-break: break-word;
}

.chat-line-system {
    padding: 0;
    background: transparent;
    border: 0;
}

.chat-line-system-inner {
    padding: 9px 12px;
    border-left: 3px solid rgba(226,113,64,.65);
    background: rgba(226,113,64,.08);
    color: #f0c6b4;
    border-radius: 10px;
    font-size: 13px;
}

.chat-line-system-text {
    color: #ffd7c6;
}

.chat-form-wrap {
    /*margin-top: 14px;*/
    /*background: #323232;*/
    /*border: 1px solid #464646;*/
    /*border-radius: 14px;*/
    /*padding: 14px;*/
}

.chat-form-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.chat-input {
    flex: 1;
    min-height: 20px;
    resize: vertical;
    background: #4b4b4b;
    border: 1px solid #656565;
    color: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    outline: none;
    font-size: 15px;
}

.chat-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(226,113,64,.14);
}

.chat-input::placeholder {
    color: #c9c9c9;
}

.chat-button {
    min-width: 130px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #ea8559 0%, #d76330 100%);
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    padding: 0 18px;
    box-shadow: 0 6px 18px rgba(226,113,64,.28);
}

.chat-button:hover {
    filter: brightness(1.05);
}

.chat-button:disabled {
    opacity: .7;
    cursor: default;
}

.chat-form-bottom {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
}

.chat-sidebar-box {
    /*padding: 16px;*/
    position: sticky;
    top: 1px;
}

.chat-online-list {
    /*margin-top: 14px;*/
}

.chat-online-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.04);
    margin-bottom: 8px;
}

.chat-online-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #8ad86f;
    box-shadow: 0 0 10px rgba(138,216,111,.5);
    flex: 0 0 10px;
}

.chat-online-name {
    color: #fff;
    font-size: 14px;
    word-break: break-word;
}

.chat-loading,
.chat-empty,
.chat-online-empty {
    color: var(--muted);
    padding: 10px 2px;
}

span.online-dot {
    color:#7cfc00; font-size:10px; position:absolute; right:0; bottom:6px;
}

div.top-users-bar {
    display: none;
}

img.chat_image {
    border:2px solid gray !important;
    border-radius:4px !important;;
    margin:5px !important;;
    max-height: 300px !important;;
    max-width: 90% !important;
    display: block;
}

div.chat-simple-user { border:1px solid orange; border-radius: 5px; display: inline-block; margin:2px; padding:4px 5px 2px 5px;  }

.chat-online-list .chat-simple-user {display: none;}
.top-users-bar .user {display:none !important; }


@media (max-width:960px) { div.top-users-bar  {  display: inline-block; }}


@media (max-width:1810px) {.chat-page { max-width: 72%;}}
@media (max-width:1600px) {.chat-page { max-width: 70%;}}
@media (max-width:1520px) {.chat-page { max-width: 62%;}}
@media (max-width:1239px) {.chat-page { max-width: 100%;}}


@media (max-width: 960px) {
    .chat-layout {
        grid-template-columns: 1fr;
    }

    .chat-sidebar-box {
        display:none;
    }
}

@media (max-width: 700px) {
    .chat-page {
        padding: 2px;
    }

    .chat-topbar,
    .chat-layout {

    }

    /*.chat-topbar,*/
    /*.chat-form-row,*/
    /*.chat-form-bottom,*/
    /*.chat-board-head {*/
    /*    display: block;*/
    /*}*/

    /*.chat-userbox,*/
    /*.chat-board-note,*/
    /*.chat-button {*/
    /*    margin-top: 10px;*/
    /*}*/

    /*.chat-button {*/
    /*    width: 100%;*/
    /*    min-height: 48px;*/
    /*}*/

    .chat-board {
        height: 420px;
    }
}
