/* ============================================================
   FRIENDS CIRCLE
   RESPONSIVE COMMUNICATION SYSTEM
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: #f4f6f8;
    color: #1f2937;

    overflow: hidden;
}


/* ============================================================
   APP
   ============================================================ */

.app {
    width: 100%;
    height: 100vh;

    display: flex;
    flex-direction: column;

    background: #ffffff;
}


/* ============================================================
   HEADER
   ============================================================ */

.app-header {
    height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    flex-shrink: 0;
}


/* BRAND */

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-logo {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #1f5f8b;
    color: #ffffff;

    font-size: 15px;
    font-weight: 700;
}

.brand-text h1 {
    font-size: 18px;
    line-height: 1.2;

    color: #1f2937;
}

.brand-text p {
    margin-top: 2px;

    font-size: 11px;
    color: #6b7280;
}


/* HEADER USER */

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #e5e7eb;
    color: #374151;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}


/* ============================================================
   CONNECTION STATUS
   ============================================================ */

.status {
    display: flex;
    align-items: center;
    gap: 6px;

    font-size: 12px;
    font-weight: 600;
}

.status::before {
    content: "";

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #111827;
}

.status.online::before {
    background: #16a34a;
}

.status.offline::before {
    background: #111827;
}

.status.online {
    color: #15803d;
}

.status.offline {
    color: #4b5563;
}


/* ============================================================
   MAIN APPLICATION
   ============================================================ */

.application {
    min-height: 0;
    flex: 1;

    display: grid;
    grid-template-columns: 25% minmax(0, 75%);

    overflow: hidden;
}


/* ============================================================
   LEFT SIDEBAR
   ============================================================ */

.side-panel {
    width: auto;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border-right: 1px solid #e5e7eb;

    overflow: hidden;

    flex-shrink: 0;
}


/* SIDEBAR PAGE */

.sidebar-page {
    display: none;

    height: 100%;

    overflow-y: auto;
}

.sidebar-page.active {
    display: block;
}


/* PANEL HEADER */

.panel-header {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 16px;

    border-bottom: 1px solid #eeeeee;

    background: #ffffff;
}

.panel-header h2 {
    font-size: 17px;

    color: #1f2937;
}

.panel-header p {
    margin-top: 4px;

    font-size: 12px;

    color: #6b7280;
}


/* ============================================================
   WORKSPACE LIST
   ============================================================ */

.workspace-list {
    padding: 8px;
}

.workspace-item {
    width: 100%;

    display: flex;
    align-items: center;

    padding: 11px 12px;

    margin-bottom: 3px;

    border: 0;
    border-radius: 8px;

    background: transparent;

    text-align: left;

    cursor: pointer;

    color: #374151;
}

.workspace-item:hover {
    background: #f3f4f6;
}

.workspace-item.active {
    background: #eaf2f8;

    color: #1f5f8b;
}

.workspace-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 10px;

    border-radius: 8px;

    background: #eef2f7;

    font-size: 14px;
    font-weight: 700;
}


/* ============================================================
   SIDEBAR SECTIONS
   ============================================================ */

.sidebar-section {
    padding: 8px 0;
}

.sidebar-section-title {
    padding: 9px 16px;

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: .05em;

    color: #6b7280;
}


/* ============================================================
   MEMBERS
   ============================================================ */

.member-list {
    padding: 0 8px;
}

.member-item {
    width: 100%;

    display: flex;
    align-items: center;

    padding: 9px 10px;

    border: 0;
    border-radius: 8px;

    background: transparent;

    cursor: pointer;

    text-align: left;
}

.member-item:hover {
    background: #f5f6f7;
}

.member-avatar {
    position: relative;

    width: 36px;
    height: 36px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-right: 10px;

    border-radius: 50%;

    background: #e5e7eb;

    color: #374151;

    font-size: 12px;
    font-weight: 700;
}

.member-indicator {
    position: absolute;

    right: -1px;
    bottom: -1px;

    width: 10px;
    height: 10px;

    border: 2px solid #ffffff;

    border-radius: 50%;

    background: #111827;
}

.member-indicator.online {
    background: #16a34a;
}

.member-info {
    min-width: 0;
    flex: 1;
}

.member-name {
    display: block;

    overflow: hidden;

    font-size: 13px;
    font-weight: 600;

    color: #374151;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.member-status-text {
    display: block;

    margin-top: 2px;

    font-size: 11px;

    color: #9ca3af;
}


/* ============================================================
   CONTENT PANEL
   ============================================================ */

.content-panel {
    min-width: 0;
    min-height: 0;

    flex: 1;

    display: flex;

    background: #f8fafc;

    overflow: hidden;
}


/* ============================================================
   CONTENT PAGES
   ============================================================ */

.content-page {
    display: none;

    width: 100%;
    height: 100%;

    flex-direction: column;
}

.content-page.active {
    display: flex;
}


/* ============================================================
   CONTENT HEADER
   ============================================================ */

.content-header {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 20px;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    flex-shrink: 0;
}

.content-header h2 {
    font-size: 17px;

    color: #1f2937;
}

.content-header p {
    margin-top: 4px;

    font-size: 12px;

    color: #6b7280;
}


/* ============================================================
   COMMUNICATION AREA
   ============================================================ */

.communication-area {
    min-height: 0;

    flex: 1;

    overflow-y: auto;

    padding: 20px;
}


/* ============================================================
   WELCOME MESSAGE
   ============================================================ */

.welcome-message {
    width: min(440px, 100%);

    margin: auto;

    padding: 35px 25px;

    text-align: center;
}

.welcome-icon {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 15px;

    border-radius: 15px;

    background: #eaf2f8;

    color: #1f5f8b;

    font-size: 16px;
    font-weight: 700;
}

.welcome-message h2 {
    margin-bottom: 8px;

    font-size: 19px;

    color: #374151;
}

.welcome-message p {
    font-size: 13px;

    line-height: 1.6;

    color: #6b7280;
}


/* ============================================================
   MESSAGE FORM
   ============================================================ */

.message-form {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 12px 14px;

    background: #ffffff;

    border-top: 1px solid #e5e7eb;

    flex-shrink: 0;
}

.message-form input {
    min-width: 0;

    flex: 1;

    height: 42px;

    padding: 0 14px;

    border: 1px solid #d1d5db;
    border-radius: 21px;

    outline: none;

    background: #f9fafb;

    color: #1f2937;

    font-size: 13px;
}

.message-form input:focus {
    border-color: #1f5f8b;

    background: #ffffff;
}

.message-form input:disabled {
    cursor: not-allowed;

    background: #f3f4f6;
}

.message-form button {
    height: 42px;

    padding: 0 17px;

    border: 0;
    border-radius: 21px;

    background: #1f5f8b;
    color: #ffffff;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.message-form button:hover {
    opacity: .92;
}

.message-form button:disabled {
    opacity: .5;

    cursor: not-allowed;
}


/* ============================================================
   MEMBER STATUS
   ============================================================ */

.member-status {
    font-size: 12px;
    color: #6b7280;
}


/* ============================================================
   CALLS / ADMIN PLACEHOLDERS
   ============================================================ */

.calls-placeholder,
.admin-placeholder,
.feature-placeholder {
    width: min(500px, calc(100% - 40px));

    margin: auto;

    padding: 40px 25px;

    text-align: center;
}

.placeholder-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 15px;

    border-radius: 14px;

    background: #eef2f7;

    color: #4b5563;

    font-size: 20px;
}

.placeholder-icon.large {
    width: 68px;
    height: 68px;

    font-size: 27px;
}

.calls-placeholder h3,
.admin-placeholder h3,
.feature-placeholder h2 {
    margin-bottom: 8px;

    color: #374151;
}

.calls-placeholder p,
.admin-placeholder p,
.feature-placeholder p {
    font-size: 13px;

    line-height: 1.6;

    color: #6b7280;
}


/* ============================================================
   EMPTY MESSAGE
   ============================================================ */

.empty-message {
    padding: 18px 12px;

    text-align: center;

    font-size: 12px;

    color: #9ca3af;
}


/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */

.bottom-navigation {
    height: 64px;

    display: flex;

    background: #ffffff;

    border-top: 1px solid #e5e7eb;

    flex-shrink: 0;
}

.nav-item {
    min-width: 0;

    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    border: 0;

    background: transparent;

    color: #6b7280;

    font-size: 10px;
    font-weight: 600;

    cursor: pointer;
}

.nav-item:hover {
    background: #f9fafb;
}

.nav-item.active {
    color: #1f5f8b;
}

.nav-icon {
    font-size: 18px;

    line-height: 1;
}


/* ============================================================
   LOGIN SCREEN
   ============================================================ */

.login-screen {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: #f4f6f8;
}

.login-screen.hidden {
    display: none;
}

.login-card {
    width: min(400px, 100%);

    padding: 32px 26px;

    border: 1px solid #e5e7eb;
    border-radius: 16px;

    background: #ffffff;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .08);
}

.login-logo {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 15px;

    border-radius: 14px;

    background: #1f5f8b;
    color: #ffffff;

    font-weight: 700;
}

.login-card h2 {
    text-align: center;

    font-size: 21px;

    color: #1f2937;
}

.login-card > p {
    margin: 6px 0 25px;

    text-align: center;

    font-size: 13px;

    color: #6b7280;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;

    margin-bottom: 6px;

    font-size: 12px;
    font-weight: 600;

    color: #374151;
}

.form-group input {
    width: 100%;
    height: 42px;

    padding: 0 12px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    outline: none;

    font-size: 13px;
}

.form-group input:focus {
    border-color: #1f5f8b;
}

.primary-button {
    width: 100%;
    height: 42px;

    border: 0;
    border-radius: 8px;

    background: #1f5f8b;
    color: #ffffff;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}


/* ============================================================
   ERROR
   ============================================================ */

.error-message {
    min-height: 18px;

    margin: 8px 0;

    color: #b91c1c;

    font-size: 12px;
}


/* ============================================================
   SCROLLBARS
   ============================================================ */

.side-panel::-webkit-scrollbar,
.sidebar-page::-webkit-scrollbar,
.communication-area::-webkit-scrollbar {
    width: 6px;
}

.side-panel::-webkit-scrollbar-thumb,
.sidebar-page::-webkit-scrollbar-thumb,
.communication-area::-webkit-scrollbar-thumb {
    background: #d1d5db;

    border-radius: 10px;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 900px) {

    .content-header {
        padding: 13px 16px;
    }

    .communication-area {
        padding: 16px;
    }

}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 700px) {

    body {
        overflow: hidden;
    }

    .app-header {
        height: 60px;

        padding: 0 12px;
    }

    .brand-logo {
        width: 36px;
        height: 36px;

        border-radius: 9px;
    }

    .brand-text h1 {
        font-size: 16px;
    }

    .brand-text p {
        display: none;
    }

    .status {
        font-size: 10px;
    }

    .user-profile {
        width: 36px;
        height: 36px;
    }


    /* MOBILE APPLICATION */

    .application {
        position: relative;

        display: block;
    }


    /* LEFT PANEL */

    .side-panel {
        width: 100%;
        height: 100%;

        border-right: 0;

        display: block;
    }


    /*
       On mobile the sidebar is the first screen.
       JavaScript will switch between sidebar
       and communication window.
    */

    .sidebar-page {
        height: 100%;
    }


    /* CONTENT */

    .content-panel {
        position: absolute;

        inset: 0;

        z-index: 20;

        display: none;

        background: #ffffff;
    }

    .content-panel.mobile-visible {
        display: flex;
    }


    .content-header {
        min-height: 62px;

        padding: 10px 13px;
    }

    .content-header h2 {
        font-size: 15px;
    }

    .content-header p {
        font-size: 11px;
    }


    .communication-area {
        padding: 12px;
    }


    .message-form {
        padding: 9px;

        padding-bottom:
            calc(9px + env(safe-area-inset-bottom));
    }


    .message-form input {
        height: 40px;

        font-size: 12px;
    }

    .message-form button {
        height: 40px;

        padding: 0 14px;

        font-size: 12px;
    }


    /* MOBILE BACK BEHAVIOUR */

    .content-panel::before {
        content: "‹";

        position: absolute;

        top: 14px;
        left: 10px;

        z-index: 10;

        width: 30px;
        height: 30px;

        display: none;

        align-items: center;
        justify-content: center;

        border-radius: 50%;

        background: #f3f4f6;

        color: #374151;

        font-size: 24px;
    }


    /* BOTTOM NAVIGATION */

    .bottom-navigation {
        height: 62px;

        padding-bottom:
            env(safe-area-inset-bottom);
    }

    .nav-item {
        font-size: 9px;
    }

    .nav-icon {
        font-size: 17px;
    }


    /* LOGIN */

    .login-card {
        padding: 28px 20px;
    }

}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 420px) {

    .app-header {
        padding: 0 9px;
    }

    .header-user {
        gap: 7px;
    }

    .status {
        display: none;
    }

    .panel-header {
        padding: 12px;
    }

    .panel-header h2 {
        font-size: 16px;
    }

    .member-item {
        padding: 8px;
    }

    .member-avatar {
        width: 34px;
        height: 34px;
    }

    .bottom-navigation {
        height: 60px;
    }

}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */

button,
input {
    font-family: inherit;
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid #1f5f8b;
    outline-offset: 2px;
}

/* ============================================================
   FRIENDS CIRCLE - FINAL RESPONSIVE LAYOUT
   Same two-column design on desktop and mobile.
   Left  = Workspaces + Members
   Right = Communication window
   ============================================================ */

@media (max-width: 700px) {

    .application {
        position: relative;

        display: grid;

        grid-template-columns:
            minmax(105px, 25%)
            minmax(0, 75%);

        height: calc(
            100vh - 60px - 62px
        );

        min-height: 0;

        overflow: hidden;
    }


    /* ========================================================
       LEFT SIDE
       Workspaces + Members
       ======================================================== */

    .side-panel {
        position: relative;

        width: auto;
        height: 100%;

        min-width: 0;
        min-height: 0;

        border-right: 1px solid #e5e7eb;
        border-bottom: 0;

        display: flex;
        flex-direction: column;

        overflow: hidden;

        background: #ffffff;
    }


    .sidebar-page {
        width: 100%;
        height: 100%;

        min-height: 0;

        overflow-y: auto;
        overflow-x: hidden;
    }


    /* ========================================================
       RIGHT SIDE
       Workspace communication window
       ======================================================== */

    .content-panel {
        position: relative !important;

        inset: auto !important;

        width: auto;
        height: 100%;

        min-width: 0;
        min-height: 0;

        z-index: 1;

        display: flex !important;
        flex-direction: column;

        overflow: hidden;

        background: #f8fafc;

        border-left: 0;
    }


    .content-header {
        flex-shrink: 0;

        min-width: 0;
    }


    .communication-area {
        flex: 1 1 auto;

        min-width: 0;
        min-height: 0;

        overflow-y: auto;
        overflow-x: hidden;

        padding: 12px;
    }


    .message-list {
        min-width: 0;
        min-height: 0;

        overflow-y: auto;
    }


    .message-form {
        flex-shrink: 0;

        min-width: 0;

        padding: 9px;

        padding-bottom:
            calc(
                9px +
                env(safe-area-inset-bottom)
            );
    }


    .message-form input {
        min-width: 0;

        height: 40px;

        font-size: 12px;
    }


    .message-form button {
        flex-shrink: 0;

        height: 40px;

        padding: 0 14px;

        font-size: 12px;
    }


    /* ========================================================
       BOTTOM NAVIGATION
       ======================================================== */

    .bottom-navigation {
        position: relative;

        z-index: 50;

        height: 62px;
        min-height: 62px;

        flex-shrink: 0;
    }


    /* ========================================================
       MOBILE CONTENT SIZING
       ======================================================== */

    .panel-header {
        min-width: 0;

        padding: 12px 10px;
    }


    .panel-header h2 {
        font-size: 15px;
    }


    .panel-header p {
        font-size: 10px;
    }


    .member-item {
        padding: 8px;
    }


    .member-avatar {
        width: 34px;
        height: 34px;

        flex-shrink: 0;
    }


    .member-info {
        min-width: 0;
    }


    .member-name {
        overflow: hidden;

        text-overflow: ellipsis;

        white-space: nowrap;
    }


    .content-title {
        min-width: 0;

        overflow: hidden;

        text-overflow: ellipsis;

        white-space: nowrap;
    }


    .content-subtitle {
        overflow: hidden;

        text-overflow: ellipsis;

        white-space: nowrap;
    }

}


/* ============================================================
   VERY SMALL MOBILE
   Keep the final 25% / 75% workspace layout.
   ============================================================ */

@media (max-width: 420px) {

    .application {
        grid-template-columns:
            minmax(95px, 25%)
            minmax(0, 75%);
    }


    .panel-header {
        padding: 10px 8px;
    }


    .panel-header h2 {
        font-size: 14px;
    }


    .member-item {
        padding: 7px;
    }


    .member-avatar {
        width: 32px;
        height: 32px;
    }


    .message-form {
        padding: 7px;
    }


    .message-form input {
        height: 38px;

        padding: 0 10px;

        font-size: 11px;
    }


    .message-form button {
        height: 38px;

        padding: 0 11px;

        font-size: 11px;
    }

}


/* ============================================================
   WORKSPACE ROOM CONTROLS
   ============================================================ */

.workspace-header {
    gap: 16px;
}


.workspace-header-info {
    min-width: 0;
    flex: 1;
}


.workspace-room-controls {
    display: flex;
    align-items: center;
    gap: 6px;

    flex-shrink: 0;
}


.room-control-button {
    min-width: 58px;
    height: 46px;

    padding: 4px 7px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 2px;

    border: 1px solid #e5e7eb;
    border-radius: 9px;

    background: #ffffff;
    color: #374151;

    cursor: pointer;

    transition:
        background .15s ease,
        border-color .15s ease,
        transform .15s ease;
}


.room-control-button:hover {
    background: #f3f4f6;
    border-color: #d1d5db;

    transform: translateY(-1px);
}


.room-control-icon {
    font-size: 18px;
    line-height: 20px;
}


.room-control-label {
    font-size: 9px;
    font-weight: 600;
    line-height: 11px;
}


.leave-room-button:hover {
    background: #fef2f2;
    border-color: #fecaca;
}


/* ============================================================
   WORKSPACE MESSAGE COMPOSER
   ============================================================ */

.workspace-message-form {
    gap: 6px;
}


.composer-icon-button {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: transparent;
    color: #4b5563;

    font-size: 19px;

    cursor: pointer;
}


.composer-icon-button:hover {
    background: #f3f4f6;
}


.workspace-message-form input {
    flex: 1;
    min-width: 0;
}


.workspace-file-input {
    display: none !important;
}


.voice-message-button {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 0;

    background: #ffffff;
    border: 1px solid #d9dee3;

    color: #333333;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.voice-message-button::before {
    content: "🎤";

    font-size: 20px;
    line-height: 1;

    display: block;
}

.voice-message-button:hover {
    background: #f3f4f6;
    border-color: #c7cdd3;
}

.voice-message-button:active {
    transform: scale(0.94);
}

.voice-message-button.recording {
    background: #fee2e2;
    border-color: #ef4444;
}

.voice-message-button.recording::before {
    content: "⏹";
    font-size: 17px;
}


.workspace-message-form .composer-send-button {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 18px;
}


/* ============================================================
   WORKSPACE ONLINE MEMBERS PANEL
   ============================================================ */

.workspace-members-panel {
    position: absolute;

    top: 0;
    right: 0;

    width: 280px;
    height: 100%;

    z-index: 30;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border-left: 1px solid #e5e7eb;

    box-shadow: -5px 0 18px rgba(0, 0, 0, .08);

    transform: translateX(100%);

    transition: transform .2s ease;

    pointer-events: none;
}


.workspace-members-panel.open {
    transform: translateX(0);

    pointer-events: auto;
}


.workspace-members-header {
    min-height: 64px;

    padding: 12px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #e5e7eb;
}


.workspace-members-header h3 {
    margin: 0;

    font-size: 15px;
    color: #1f2937;
}


.workspace-members-header p {
    margin: 3px 0 0;

    font-size: 11px;
    color: #6b7280;
}


.workspace-members-close {
    width: 32px;
    height: 32px;

    border: 0;
    border-radius: 50%;

    background: #f3f4f6;

    color: #374151;

    font-size: 22px;
    line-height: 1;

    cursor: pointer;
}


.workspace-members-close:hover {
    background: #e5e7eb;
}


.workspace-members-list {
    flex: 1;

    min-height: 0;

    overflow-y: auto;

    padding: 8px;
}


.workspace-members-empty {
    padding: 25px 12px;

    text-align: center;

    font-size: 12px;

    color: #9ca3af;
}


.workspace-member-item {
    width: 100%;

    min-height: 54px;

    padding: 7px 8px;

    display: flex;
    align-items: center;

    gap: 9px;

    border-radius: 8px;

    background: transparent;
}


.workspace-member-item:hover {
    background: #f9fafb;
}


.workspace-member-avatar {
    position: relative;

    width: 36px;
    height: 36px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #e5e7eb;

    font-size: 13px;
    font-weight: 600;

    color: #374151;
}


.workspace-member-online-dot {
    position: absolute;

    right: -1px;
    bottom: -1px;

    width: 10px;
    height: 10px;

    border: 2px solid #ffffff;

    border-radius: 50%;

    background: #22c55e;
}


.workspace-member-info {
    min-width: 0;
    flex: 1;
}


.workspace-member-name {
    display: block;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 12px;
    font-weight: 600;

    color: #1f2937;
}


.workspace-member-status {
    display: block;

    margin-top: 2px;

    font-size: 10px;

    color: #22a55a;
}


/* ============================================================
   WORKSPACE RESPONSIVE CONTROLS
   ============================================================ */

@media (max-width: 900px) {

    .room-control-button {
        min-width: 48px;
    }

    .room-control-label {
        display: none;
    }

}


@media (max-width: 700px) {

    .workspace-header {
        min-height: 62px;
        padding: 9px 10px;
    }


    .workspace-room-controls {
        gap: 2px;
    }


    .room-control-button {
        width: 38px;
        min-width: 38px;
        height: 38px;

        padding: 0;

        border: 0;
    }


    .room-control-icon {
        font-size: 17px;
    }


    .workspace-members-panel {
        width: min(280px, 82%);
    }


    .workspace-message-form {
        padding: 7px;
    }


    .workspace-message-form .composer-icon-button,
    .workspace-message-form .composer-send-button {
        width: 38px;
        height: 38px;
    }


    .workspace-message-form input {
        height: 38px;
        padding: 0 12px;
    }

}


@media (max-width: 420px) {

    .workspace-header-info {
        max-width: 42%;
    }


    .workspace-header h2 {
        overflow: hidden;

        text-overflow: ellipsis;
        white-space: nowrap;
    }


    .workspace-header p {
        overflow: hidden;

        text-overflow: ellipsis;
        white-space: nowrap;
    }


    .room-control-button {
        width: 34px;
        min-width: 34px;
    }


    .room-control-icon {
        font-size: 15px;
    }


    .workspace-message-form .composer-icon-button,
    .workspace-message-form .composer-send-button {
        width: 34px;
        height: 34px;

        font-size: 16px;
    }

}


/* ============================================================
   WORKSPACE ROOM LIST — REAL BACKEND ROOMS
   ============================================================ */

.workspace-list-item {
    width: 100%;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    padding: 11px 12px;
    margin: 0 0 3px 0;

    border: 0;
    border-radius: 8px;

    background: transparent;

    text-align: left;
    font-family: inherit;

    color: #374151;
    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;
}

.workspace-list-item:hover {
    background: #f3f4f6;
}

.workspace-list-item:focus {
    outline: none;
}

.workspace-list-item.active {
    background: #eaf2f8;
    color: #1f5f8b;
}

.workspace-list-name {
    display: block;

    width: 100%;

    font-size: 14px;
    font-weight: 600;
    line-height: 20px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace-list-description {
    display: block;

    width: 100%;
    margin-top: 2px;

    font-size: 11px;
    line-height: 16px;

    color: #6b7280;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================================
   COMPOSER ACTION BUTTONS
   Match Video / Leave button style
   ============================================================ */

.workspace-message-form .composer-icon-button,
.workspace-message-form .composer-send-button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e1e5ea;
    border-radius: 10px;
    color: #344054;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.workspace-message-form .composer-icon-button:hover,
.workspace-message-form .composer-send-button:hover {
    background: #f8fafc;
    border-color: #cfd5dc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.workspace-message-form .composer-icon-button:active,
.workspace-message-form .composer-send-button:active {
    transform: translateY(1px);
}

.workspace-message-form .voice-message-button {
    font-size: 19px;
    background: #ffffff;
    border: 1px solid #e1e5ea;
}

.workspace-message-form .composer-send-button {
    font-size: 20px;
    background: #ffffff;
    border: 1px solid #e1e5ea;
}

.workspace-message-form .composer-icon-button,
.workspace-message-form .composer-send-button {
    border-radius: 10px !important;
}


/* ============================================================
   FRIENDS CIRCLE LOGOFF BUTTON
   Leave-style circular control
   ============================================================ */

.header-user .workspace-logout-button,
.workspace-logout-button {
    width: 42px !important;
    height: 42px !important;

    min-width: 42px !important;
    min-height: 42px !important;

    padding: 0 !important;
    margin-left: 8px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 50% !important;

    background: transparent !important;
    border: 1px solid #d9dee3 !important;

    color: #333 !important;

    font-size: 22px !important;
    line-height: 1 !important;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.header-user .workspace-logout-button:hover,
.workspace-logout-button:hover {
    background: #f3f4f6 !important;
    border-color: #c7cdd3 !important;
}

.header-user .workspace-logout-button:active,
.workspace-logout-button:active {
    transform: scale(0.94);
}
