/* Local assets only. Visual layer above the functional layout. */
.mobile-back {
    display: none;
}
:root {
    --blue: #257561;
    --line: #e4e9e6;
    color: #233a35;
    background: #f4f6f3;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
}
body {
    letter-spacing: -0.015em;
}
button,
a,
input,
textarea,
select {
    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}
button:hover:not(:disabled) {
    background: #edf3ed;
    border-color: #bacfc2;
}
.primary {
    background: #256f5a;
    border-color: #256f5a;
    font-weight: 600;
    box-shadow: 0 3px 7px #153e2210;
}
.primary:hover:not(:disabled) {
    background: #1d5948;
    border-color: #1d5948;
}
button:focus-visible,
a:focus-visible {
    outline: 3px solid #7ba58f;
    outline-offset: 3px;
}
input,
textarea,
select {
    border-color: #dde5df;
    border-radius: 11px;
    padding: 12px 14px;
}
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #b4d7c2;
    border-color: #75a58c;
}
input::placeholder,
textarea::placeholder {
    color: #81918a;
}
.ui-icon {
    flex-shrink: 0;
    vertical-align: middle;
}
.navigation {
    width: 240px;
    background: #142b2a;
    color: #dae6de;
    border: 0;
    padding: 32px 20px 22px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 5px;
    color: #f2f8ed;
    font-size: 31px;
    font-weight: 650;
    letter-spacing: -0.055em;
}
.brand img {
    flex-shrink: 0;
}
.brand span {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0;
    color: #a8bbb7;
    margin-top: 4px;
    line-height: 1.5;
}
.nav-caption {
    font-size: 9px;
    letter-spacing: 0.14em;
    color: #a0b7b1;
    margin: 48px 14px 12px;
}
.navigation nav {
    margin: 0;
    gap: 6px;
}
.navigation nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    color: #b8cbc5;
    font-size: 14px;
    border: 1px solid transparent;
}
.navigation nav a:hover {
    color: #fff;
    background: #ffffff08;
}
.navigation nav a.selected {
    background: #294540;
    color: #dcf7cb;
    border-color: #3c5750;
}
.nav-note {
    margin: auto 10px 25px;
    padding: 20px 0;
    border-top: 1px solid #ffffff12;
}
.nav-note .ui-icon {
    color: #acd0ab;
    margin-right: 7px;
    width: 17px;
}
.nav-note strong {
    font-size: 12px;
    font-weight: 500;
}
.nav-note p {
    font-size: 11px;
    line-height: 1.7;
    color: #a3b9b1;
    margin: 8px 0 0;
    max-width: 170px;
}
.identity {
    margin: 0;
    border-top: 1px solid #ffffff12;
    padding: 22px 7px 0;
}
.identity-top {
    display: flex;
    gap: 11px;
    align-items: center;
}
.identity-avatar {
    display: grid;
    place-content: center;
    width: 37px;
    height: 37px;
    border-radius: 50%;
    background: #b8c4dd;
    color: #283c56;
    font-weight: 650;
    font-size: 17px;
    flex-shrink: 0;
}
.identity strong {
    font-size: 13px;
    font-weight: 550;
    overflow-wrap: anywhere;
}
.identity small {
    font-size: 11px;
    margin: 3px 0;
    color: #afc2ba;
}
.identity .quiet {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #afc2ba;
    margin-top: 17px;
    padding: 7px 0;
    border: 0;
}
.identity .quiet:hover {
    background: transparent;
    color: #fff;
}
.identity .quiet .ui-icon {
    width: 15px;
}
.workspace {
    margin-left: 240px;
    padding: 36px 42px;
}
.page-title {
    margin: 6px 0 30px;
}
.page-title h1 {
    font-size: 32px;
    letter-spacing: -0.04em;
    font-weight: 620;
    margin-top: 9px;
}
.eyebrow {
    color: #708b7e;
    font-size: 10px;
}
.muted,
small {
    color: #697d71;
}
.panel {
    border: 1px solid #e3e9e2;
    border-radius: 19px;
    padding: 29px;
    box-shadow: 0 5px 24px #163b2504;
}
.panel h2 {
    font-size: 18px;
    letter-spacing: -0.02em;
    margin-bottom: 25px;
}
.admin-grid {
    grid-template-columns: minmax(280px, 390px) minmax(320px, 1fr);
    gap: 26px;
}
.user-row {
    padding: 24px 0;
}
.user-row strong {
    font-size: 15px;
}
.tag,
.counter {
    background: #e7eee7;
    color: #55715e;
    font-size: 11px;
    padding: 6px 11px;
}
.tag.active {
    background: #e9f3e8;
    color: #4b744e;
}
.error {
    background: #fbefea;
    color: #9c5340;
    border: 1px solid #f1ded6;
    font-size: 12px;
}
.notice {
    background: #e8f3e6;
    border: 1px solid #d6e8d1;
}
.narrow {
    max-width: 520px;
}
.inbox {
    height: 100dvh;
    grid-template-columns: 320px minmax(0, 1fr);
}
.chat-list {
    background: #fff;
    border-right: 1px solid #e8ede7;
}
.chat-list header {
    padding: 31px 24px 20px;
}
.chat-list h1 {
    font-size: 25px;
    letter-spacing: -0.035em;
    font-weight: 650;
    margin-bottom: 8px;
}
.small-link {
    font-size: 11px;
    color: #587664;
}
.chat-list input {
    margin-top: 23px;
    background: #f5f7f4;
    border-color: transparent;
    padding: 12px;
    font-size: 12px;
}
.chat-list select {
    background: transparent;
    border: 0;
    padding: 8px 0;
    margin-top: 8px;
    color: #687d70;
    font-size: 11px;
}
.chat-scroll {
    padding: 6px 10px;
    scrollbar-width: thin;
    scrollbar-color: #c6d3c9 transparent;
    overscroll-behavior: contain;
}
.chat-item {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 15px 12px;
    margin: 3px 0;
    gap: 11px;
}
.chat-item:hover {
    background: #f5f7f3 !important;
}
.chat-item.selected {
    background: #edf4e9;
    border-color: #e0ebda;
    box-shadow: none;
}
.chat-info strong {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}
.chat-info small {
    font-size: 10px;
    color: #627c6b;
    margin: 2px 0;
}
.chat-info > .muted {
    font-size: 11px;
    color: #74877a;
    max-width: 205px;
}
.avatar {
    width: 40px;
    height: 40px;
    background: #e8ede0;
    color: #60734c;
    font-size: 14px;
}
.chat-item:nth-child(3n) .avatar {
    background: #ebe8f2;
    color: #7e7296;
}
.chat-item:nth-child(3n + 1) .avatar {
    background: #e4eef2;
    color: #6b8795;
}
.unread {
    background: #2f7f65;
    min-width: 19px;
    font-size: 10px;
    padding: 3px 5px;
}
.chat-list > #refresh-chats {
    border: 0;
    border-top: 1px solid #edf0eb;
    border-radius: 0;
    margin-top: 8px;
    padding: 17px;
    font-size: 11px;
    color: #657e6d;
}
.conversation-head {
    padding: 25px 30px;
    min-height: 94px;
    background: #fff;
}
.conversation-head h2 {
    font-size: 16px;
    font-weight: 600;
}
.conversation-head small {
    font-size: 11px;
    color: #73877a;
}
.conversation-head button {
    font-size: 11px;
    padding: 9px 12px;
    border-color: #e6ebe4;
    color: #607866;
}
.message-scroll {
    padding: 26px 34px;
    background-color: #f4f6f1;
    background-image: radial-gradient(#82997717 0.7px, transparent 0.7px);
    background-size: 18px 18px;
    scrollbar-width: thin;
    scrollbar-color: #ccd7ca transparent;
    overscroll-behavior: contain;
}
.bubble {
    border: 1px solid #e6eae1;
    border-radius: 15px 15px 15px 4px;
    padding: 14px 17px;
    box-shadow: 0 2px 5px #1b3e2410;
    margin: 12px 0;
    max-width: min(83%, 600px);
}
.bubble.outgoing {
    background: #dfedda;
    border-color: #d5e5cf;
    border-radius: 15px 15px 4px 15px;
}
.bubble .sender {
    color: #52765e;
    font-size: 11px;
    margin-bottom: 7px;
}
.bubble .body {
    font-size: 14px;
    line-height: 1.6;
    color: #34483d;
}
.bubble small {
    font-size: 10px;
}
.bubble .actions {
    gap: 14px;
}
.bubble .actions button {
    color: #587d61;
    font-size: 10px;
}
.bubble blockquote {
    border-color: #7bab76;
    border-radius: 0 5px 5px 0;
    color: #596f5a;
}
.media-thumb {
    max-height: 310px;
    border-radius: 10px;
}
.bubble audio {
    height: 40px;
    margin-top: 8px;
}
.composer {
    padding: 19px 25px 21px;
    background: #fff;
    border-top: 1px solid #e7ece5;
}
.composer textarea {
    border-radius: 13px;
    background: #fafbf9;
    border-color: #e3eae0;
    padding: 13px 16px;
    font-size: 13px;
}
.composer-actions {
    margin-top: 12px;
    gap: 9px;
}
.composer-actions button,
.file-button {
    border-radius: 9px;
    font-size: 11px;
    padding: 9px 12px;
}
.composer-actions .primary {
    padding: 10px 25px;
}
.composer-actions .muted {
    font-size: 10px;
}
.reply-preview {
    background: #eaf2e3;
    color: #5b7450;
}
.empty {
    padding: 75px 24px;
    color: #6c826c;
    font-size: 13px;
}
.conversation #messages > .empty:before {
    content: "↔";
    display: grid;
    place-content: center;
    width: 70px;
    height: 70px;
    border: 1px solid #dce6d6;
    border-radius: 24px;
    background: #e9efdf;
    color: #789c6a;
    font-size: 34px;
    margin: 9vh auto 25px;
}
.conversation #messages > .empty {
    max-width: 380px;
    margin: auto;
    line-height: 1.9;
}
dialog {
    border-radius: 20px;
    border-color: #dde7d8;
    padding: 29px;
}
dialog::backdrop {
    background: #122922af;
    backdrop-filter: blur(5px);
}
.login-wrapper {
    background: #edf1e7;
    background-image:
        radial-gradient(ellipse at 15% 20%, #d3e5cb, transparent 50%),
        radial-gradient(ellipse at 85% 85%, #dce3ef, transparent 55%);
}
.login-card {
    border: 1px solid #fff;
    background: #ffffffec;
    border-radius: 26px;
    padding: 42px;
    box-shadow: 0 22px 100px #2e553112;
    width: min(440px, 90vw);
}
.login-card h1 {
    color: #294b3e;
    font-size: 32px;
    font-weight: 620;
    letter-spacing: -0.05em;
    line-height: 1.2;
}
.login-card .muted {
    font-size: 13px;
}
.login-card label {
    font-size: 12px;
}
.login-card .primary {
    padding: 13px;
    margin-top: 15px;
}
.login-card .badge {
    background: transparent;
    font-size: 0;
    background-image: url("/brand.svg");
    background-size: cover;
}
@media (min-width: 1600px) {
    .inbox {
        grid-template-columns: 370px minmax(0, 1fr);
    }
    .message-scroll {
        padding-left: 7%;
        padding-right: 7%;
    }
}
@media (max-width: 1100px) {
    .navigation {
        width: 205px;
        padding: 28px 15px;
    }
    .workspace {
        margin-left: 205px;
        padding: 26px;
    }
    .inbox {
        grid-template-columns: 275px minmax(0, 1fr);
    }
    .admin-grid {
        grid-template-columns: 1fr;
    }
    .brand span {
        font-size: 9px;
    }
    .chat-list header {
        padding: 25px 19px;
    }
    .message-scroll {
        padding: 20px;
    }
}
@media (max-width: 700px) {
    .navigation {
        position: static;
        width: 100%;
        padding: 15px 15px 9px;
    }
    .brand {
        font-size: 23px;
    }
    .brand img {
        width: 30px;
        height: 30px;
    }
    .brand span,
    .nav-caption,
    .nav-note,
    .identity {
        display: none;
    }
    .navigation nav {
        display: flex;
        gap: 5px;
        margin-top: 14px;
        flex-wrap: wrap;
    }
    .navigation nav a {
        font-size: 11px;
        gap: 6px;
        padding: 9px 8px;
    }
    .navigation nav .ui-icon {
        width: 15px;
        height: 15px;
    }
    .workspace {
        margin: 0;
        padding: 20px 15px;
    }
    .inbox {
        height: calc(100dvh - 111px);
        grid-template-columns: 125px minmax(0, 1fr);
    }
    .chat-list header {
        padding: 17px 10px 5px;
    }
    .chat-list h1 {
        font-size: 18px;
    }
    .chat-list .small-link {
        font-size: 10px;
    }
    .chat-list input {
        padding: 8px;
        font-size: 10px;
        margin-top: 15px;
    }
    .chat-scroll {
        padding: 3px;
    }
    .chat-item {
        padding: 11px 7px;
        gap: 3px;
    }
    .chat-item .avatar {
        display: none;
    }
    .chat-info strong {
        font-size: 11px;
    }
    .chat-info > .muted {
        font-size: 10px;
    }
    .conversation-head {
        padding: 16px 13px;
        min-height: 85px;
        gap: 8px;
    }
    .conversation-head h2 {
        font-size: 14px;
    }
    .conversation-head button {
        font-size: 10px;
        padding: 6px;
    }
    .message-scroll {
        padding: 12px 9px;
    }
    .bubble {
        max-width: 97%;
        padding: 10px 12px;
    }
    .bubble .body {
        font-size: 13px;
    }
    .composer {
        padding: 12px 9px;
    }
    .composer-actions {
        gap: 6px;
    }
    .composer-actions button,
    .file-button {
        font-size: 10px;
        padding: 7px;
    }
    .composer-actions .primary {
        padding: 8px 13px;
    }
    .login-card {
        padding: 30px;
    }
    .page-title h1 {
        font-size: 28px;
    }
    .panel {
        padding: 23px;
    }
    .conversation #messages > .empty:before {
        margin-top: 3vh;
    }
    .chat-list > #refresh-chats {
        font-size: 10px;
    }
}
@media (max-width: 700px) {
    body:has(.inbox) {
        display: flex;
        flex-direction: column;
        height: 100dvh;
        overflow: hidden;
    }
    body:has(.inbox) .navigation {
        flex-shrink: 0;
    }
    .workspace:has(.inbox) {
        flex: 1;
        min-height: 0;
    }
    .inbox {
        display: block;
        height: 100%;
    }
    .inbox .chat-list,
    .inbox .conversation {
        height: 100%;
    }
    .inbox:not(.chat-open) .conversation,
    .inbox.chat-open .chat-list {
        display: none;
    }
    .mobile-back {
        display: inline-flex;
        align-items: center;
    }
    .chat-list header {
        padding: 20px 22px 8px;
    }
    .chat-list h1 {
        font-size: 24px;
    }
    .chat-list input {
        font-size: 14px;
        padding: 12px;
    }
    .chat-item {
        padding: 15px 17px;
        gap: 12px;
    }
    .chat-item .avatar {
        display: grid;
    }
    .chat-info strong {
        font-size: 14px;
    }
    .chat-info small,
    .chat-info > .muted {
        font-size: 12px;
    }
    .conversation-head > div {
        flex: 1;
        min-width: 0;
    }
    .conversation-head h2 {
        overflow-wrap: anywhere;
    }
    .composer-actions button,
    .file-button {
        min-height: 40px;
        font-size: 12px;
    }
    .bubble .body {
        font-size: 15px;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
