* {
    box-sizing: border-box;
}

/* Meeting UI Rewrite */
.meeting-layout.meeting-layout-v2 {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #f3f4f6;
    color: #111827;
}

.meeting-layout-v2 .meeting-header {
    height: auto;
    min-height: 0;
    padding: 10px 16px 0;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 30;
}

.meeting-layout-v2 .meeting-header-main {
    display: block;
    position: relative;
    width: 100%;
}

.meeting-layout-v2 .meeting-detail-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border: 1px solid #dbe1ea;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    overflow: visible;
    width: 100%;
}

.meeting-layout-v2 .meeting-detail-summary {
    display: block;
}

.meeting-layout-v2 .meeting-detail-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #111827;
    cursor: pointer;
}

.meeting-layout-v2 .meeting-detail-toggle:hover {
    background: #f8fafc;
}

.meeting-layout-v2 .meeting-detail-toggle-text {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.meeting-layout-v2 .meeting-detail-body {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    transform: none;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 100%;
    padding: 12px;
    margin-top: 0;
    border: 1px solid #dbe1ea;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    z-index: 35;
}

.meeting-layout-v2 .meeting-detail-body[hidden] {
    display: none;
}

.meeting-layout-v2 .meeting-detail-item {
    min-width: 0;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.meeting-layout-v2 .meeting-detail-item-status {
    grid-column: auto;
}

.meeting-layout-v2 .meeting-detail-label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    color: #6b7280;
    letter-spacing: 0.04em;
}

.meeting-layout-v2 .meeting-detail-value {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    word-break: break-all;
}

.meeting-layout-v2 .meeting-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 24px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    color: #4b5563;
    font-size: 11px;
    cursor: pointer;
    flex: 0 0 auto;
}

.meeting-layout-v2 .meeting-copy-btn:hover {
    background: #f3f4f6;
}

.meeting-layout-v2 .meeting-detail-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #15803d;
    font-size: 12px;
    border: 1px solid #bbf7d0;
}

.meeting-layout-v2 .global-voice-status,
.meeting-layout-v2 .online-status {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 8px 14px;
    color: #111827;
}

.meeting-layout-v2 .meeting-shell {
    min-height: 0;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
}

.meeting-layout-v2 .meeting-rail {
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.meeting-layout-v2 .meeting-rail-head {
    padding: 18px 18px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.meeting-layout-v2 .meeting-rail-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.meeting-layout-v2 .meeting-rail-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

.meeting-layout-v2 .participant-grid {
    order: initial;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: auto;
    min-width: 0;
    max-width: none;
    min-height: 0;
    height: auto;
    padding: 32px 14px 14px;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: stretch;
    justify-content: flex-start;
    background: transparent;
}

.meeting-layout-v2 .participant-grid-remote {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meeting-layout-v2 .participant-card {
    min-height: 110px;
    aspect-ratio: auto;
    border-radius: 14px;
    border: 1px solid #dbe1ea;
    background: #1f2937;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 14px;
    box-shadow: none;
}

.meeting-layout-v2 .participant-card.is-self {
    border-color: #93c5fd;
    background: #111827;
}

.meeting-layout-v2 .avatar-circle {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    font-size: 18px;
    background: rgba(148, 163, 184, 0.28);
    color: #f8fafc;
}

.meeting-layout-v2 .participant-name {
    position: static;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0;
    background: none;
    border-radius: 0;
    font-size: 13px;
    color: #f8fafc;
}

.meeting-layout-v2 .meeting-main {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: block;
    margin-right: 0 !important;
    overflow: hidden;
}

.meeting-layout-v2 .meeting-stage-panel {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.meeting-layout-v2 .video-stage {
    order: initial;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    border: 1px solid #dbe1ea;
    border-radius: 14px;
    background: #0f172a;
    overflow: hidden;
}

.meeting-layout-v2 .video-stage-empty {
    min-height: 0;
    height: 100%;
    padding: 24px;
    background: #111827;
    color: #9ca3af;
}

.meeting-layout-v2 .video-stage-grid {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    padding: 14px;
    align-items: stretch;
    align-content: stretch;
}

.meeting-layout-v2 .video-stage-grid.no-screen-share {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.meeting-layout-v2 .video-stage-grid.has-screen-share {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 260px;
    grid-auto-rows: minmax(0, 1fr);
}

.meeting-layout-v2 .video-stage-grid.has-screen-share .video-feed-card.source-screen_share {
    grid-column: 1;
    grid-row: 1 / -1;
}

.meeting-layout-v2 .video-stage-grid.has-screen-share .video-feed-card:not(.source-screen_share) {
    grid-column: 2;
    min-height: 180px;
}

.meeting-layout-v2 .video-feed-card {
    position: relative;
    display: flex;
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #000;
    box-shadow: none;
    overflow: hidden;
}

.meeting-layout-v2 .video-feed-slot {
    flex: 1 1 auto;
    min-height: 0;
}

.meeting-layout-v2 .video-feed-slot video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.meeting-layout-v2 .video-feed-label {
    left: 14px;
    bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #f8fafc;
}

.meeting-layout-v2 .meeting-sidebar {
    top: 16px;
    right: 16px;
    bottom: 16px;
    width: min(420px, calc(100vw - 32px));
    z-index: 60;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.meeting-layout-v2 .tab-close-btn {
    position: relative;
    z-index: 61;
}

.meeting-layout-v2 .sidebar-tabs {
    padding: 0 18px;
}

.meeting-layout-v2 .chat-messages,
.meeting-layout-v2 .member-list {
    padding: 16px 18px;
}

.meeting-layout-v2 .chat-input-area {
    padding: 16px 18px 18px;
}

.meeting-layout-v2 .meeting-footer {
    height: auto;
    min-height: 84px;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 16px;
    align-items: center;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

.meeting-layout-v2 .footer-left,
.meeting-layout-v2 .footer-center,
.meeting-layout-v2 .footer-right {
    gap: 10px;
}

.meeting-layout-v2 .footer-left {
    min-width: 0;
}

.meeting-layout-v2 .audio-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meeting-layout-v2 .meeting-footer-note {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

.meeting-layout-v2 .meeting-footer-tips {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.meeting-layout-v2 .footer-tip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 12px;
    line-height: 1;
}

.meeting-layout-v2 .control-btn {
    min-width: 68px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    background: #f8fafc;
    color: #374151;
}

.meeting-layout-v2 .control-btn:hover {
    background: #eef2f7;
}

.meeting-layout-v2 .leave-btn {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
}

.meeting-layout-v2.desktop-screen-share-active .meeting-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0;
    height: 100%;
}

.meeting-layout-v2.desktop-screen-share-active .meeting-rail {
    position: fixed;
    top: 18px;
    right: 18px;
    bottom: 94px;
    width: 112px;
    z-index: 35;
    display: flex;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e5e7eb;
}

.meeting-layout-v2.desktop-screen-share-active .meeting-header {
    position: fixed;
    top: 18px;
    left: 18px;
    right: auto;
    width: auto;
    min-height: auto;
    max-width: calc(100vw - 176px);
    padding: 10px 14px;
    z-index: 40;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
}

.meeting-layout-v2.desktop-screen-share-active .meeting-kicker {
    margin-bottom: 4px;
}

.meeting-layout-v2.desktop-screen-share-active .meeting-title {
    margin: 0;
    font-size: 16px;
}

.meeting-layout-v2.desktop-screen-share-active .meeting-detail-summary-meta,
.meeting-layout-v2.desktop-screen-share-active .meeting-detail-toggle,
.meeting-layout-v2.desktop-screen-share-active .meeting-detail-body,
.meeting-layout-v2.desktop-screen-share-active .meeting-rail-head,
.meeting-layout-v2.desktop-screen-share-active .footer-center {
    display: none;
}

.meeting-layout-v2.desktop-screen-share-active .meeting-footer {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 40;
    width: auto;
    min-height: auto;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
}

.meeting-layout-v2.desktop-screen-share-active .footer-left,
.meeting-layout-v2.desktop-screen-share-active .footer-right {
    display: flex;
    align-items: center;
}

.meeting-layout-v2.desktop-screen-share-active .footer-right {
    gap: 8px;
}

.meeting-layout-v2.desktop-screen-share-active .audio-controls {
    flex-wrap: nowrap;
    gap: 8px;
}

.meeting-layout-v2.desktop-screen-share-active .control-btn {
    min-width: 60px;
    padding: 8px 10px;
}

.meeting-layout-v2.desktop-screen-share-active .meeting-main {
    position: relative;
    inset: auto;
    z-index: auto;
    height: 100%;
    min-height: 0;
}

.meeting-layout-v2.desktop-screen-share-active .meeting-stage-panel {
    height: 100%;
    gap: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: #000;
    box-shadow: none;
}

.meeting-layout-v2.desktop-screen-share-active .video-stage {
    border: none;
    border-radius: 0;
    background: #000;
    height: 100%;
}

.meeting-layout-v2.desktop-screen-share-active .video-stage-grid {
    padding: 0;
    gap: 0;
}

.meeting-layout-v2.desktop-screen-share-active .video-stage-grid.has-screen-share {
    grid-template-columns: minmax(0, 1fr);
}

.meeting-layout-v2.desktop-screen-share-active .video-stage-grid.has-screen-share .video-feed-card.source-screen_share,
.meeting-layout-v2.desktop-screen-share-active .video-feed-card {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.meeting-layout-v2.desktop-screen-share-active .video-feed-label {
    bottom: 24px;
    left: 18px;
}

.meeting-layout-v2.desktop-screen-share-active .participant-grid {
    padding: 10px;
    gap: 10px;
}

.meeting-layout-v2.desktop-screen-share-active .participant-card {
    min-height: 78px;
    padding: 10px;
    border-radius: 16px;
}

.meeting-layout-v2.desktop-screen-share-active .avatar-circle {
    width: 28px;
    height: 28px;
    margin-bottom: 6px;
    font-size: 12px;
}

.meeting-layout-v2.desktop-screen-share-active .participant-name {
    font-size: 10px;
    gap: 4px;
}

@media (max-width: 1100px) {
    .meeting-layout-v2 .meeting-shell {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .meeting-layout-v2 .meeting-title {
        font-size: 16px;
    }

    .meeting-layout-v2 .meeting-detail-body {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .meeting-layout-v2 .meeting-footer {
        grid-template-columns: 1fr auto;
    }

    .meeting-layout-v2 .footer-center {
        display: none;
    }
}

@media (max-width: 768px) {
    .meeting-layout-v2 {
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .meeting-layout-v2 .meeting-header {
        min-height: auto;
        padding: 8px 10px 0;
    }

    .meeting-layout-v2 .meeting-detail-panel {
        padding: 0;
        border-radius: 10px;
    }

    .meeting-layout-v2 .meeting-detail-toggle {
        height: 36px;
        padding: 0 12px;
    }

    .meeting-layout-v2 .meeting-detail-body {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        transform: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        z-index: 35;
    }

    .meeting-layout-v2 .meeting-detail-item {
        padding: 10px 12px;
        border-radius: 14px;
    }

    .meeting-layout-v2 .meeting-detail-label {
        font-size: 10px;
    }

    .meeting-layout-v2 .meeting-detail-value {
        font-size: 12px;
    }

    .meeting-layout-v2 .meeting-shell {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1fr) auto;
        gap: 0;
        padding: 0;
        height: 100%;
        align-content: stretch;
    }

    .meeting-layout-v2 .meeting-main {
        order: 1;
    }

    .meeting-layout-v2 .meeting-rail {
        order: 2;
        border: none;
        border-top: 1px solid rgba(148, 163, 184, 0.12);
        border-radius: 0;
        box-shadow: none;
        background: rgba(8, 16, 29, 0.92);
        align-self: end;
    }

    .meeting-layout-v2 .meeting-rail-head {
        padding: 10px 12px;
    }

    .meeting-layout-v2 .participant-grid {
        flex-direction: row;
        padding: 8px 12px 10px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .meeting-layout-v2 .participant-grid-remote {
        flex-direction: row;
    }

    .meeting-layout-v2 .participant-card {
        flex: 0 0 86px;
        min-width: 86px;
        min-height: 86px;
        border-radius: 16px;
        padding: 10px;
    }

    .meeting-layout-v2 .avatar-circle {
        width: 32px;
        height: 32px;
        margin-bottom: 8px;
        font-size: 12px;
    }

    .meeting-layout-v2 .participant-name {
        font-size: 10px;
        gap: 6px;
    }

    .meeting-layout-v2 .meeting-stage-panel {
        border: none;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        background: #000;
    }

    .meeting-layout-v2 .video-stage {
        border: none;
        border-radius: 0;
    }

    .meeting-layout-v2 .video-stage-grid {
        padding: 0;
        gap: 0;
        grid-template-columns: 1fr;
    }

    .meeting-layout-v2 .video-stage-grid.has-screen-share {
        grid-template-columns: 1fr;
    }

    .meeting-layout-v2 .video-feed-card,
    .meeting-layout-v2 .video-stage-grid.has-screen-share .video-feed-card.source-screen_share {
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .meeting-layout-v2 .meeting-sidebar {
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 60;
        border: none;
        border-radius: 0;
    }

    .meeting-layout-v2 .meeting-footer {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        min-height: auto;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    }

    .meeting-layout-v2 .footer-center {
        display: none;
    }

    .meeting-layout-v2 .footer-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .meeting-layout-v2 .audio-controls {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
    }

    .meeting-layout-v2 .control-btn {
        min-width: 50px;
        padding: 6px;
    }

    .meeting-layout-v2 .control-label {
        font-size: 9px;
    }

    .meeting-layout-v2 .leave-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --danger-color: #dc2626;
    --danger-hover: #b91c1c;
    --text-main: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --shadow-base: 0 4px 14px rgba(15, 23, 42, 0.06);
    --sidebar-bg: #111827;
    --sidebar-text: rgba(255, 255, 255, 0.68);
    --sidebar-text-active: #ffffff;
    --sidebar-bg-active: #1f2937;
    --border-radius: 10px;
    --border-radius-sm: 8px;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5714285714285714;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-hover);
}

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

/* ==========================================================================
   企业级后台布局 (Admin Layout)
   ========================================================================== */
.admin-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.admin-sider {
    width: 256px;
    background: var(--sidebar-bg);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 10;
    transition: width 0.3s;
}

.admin-logo {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    color: #fff;
    overflow: hidden;
    text-decoration: none;
}

.admin-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.admin-logo-text {
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
}

.admin-menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.3s;
    margin: 0 8px;
    border-radius: var(--border-radius);
    gap: 12px;
}

.admin-menu-item:hover {
    color: var(--sidebar-text-active);
    background: rgba(255, 255, 255, 0.08);
}

.admin-menu-item.is-active {
    background: var(--sidebar-bg-active);
    color: var(--sidebar-text-active);
}

.admin-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-header {
    height: 64px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 9;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-breadcrumb {
    color: var(--text-secondary);
}

.admin-breadcrumb span {
    margin: 0 8px;
    color: var(--text-muted);
}

.admin-breadcrumb strong {
    color: var(--text-main);
    font-weight: normal;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-user-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 0 8px;
    border-radius: var(--border-radius-sm);
    transition: background 0.3s;
    text-decoration: none;
    color: var(--text-main);
}

.admin-user-dropdown:hover {
    background: rgba(0, 0, 0, 0.025);
}

.admin-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* ==========================================================================
   企业级组件 (Components)
   ========================================================================== */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-base);
    margin-bottom: 24px;
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.build-progress {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #eef2f6;
    overflow: hidden;
}

.build-progress-bar {
    height: 100%;
    width: 0;
    background: var(--primary-color);
    transition: width 0.4s ease;
}

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

.build-result-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #fafafa;
    padding: 14px 16px;
}

.build-result-label {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 6px;
}

.build-result-value {
    color: var(--text-main);
    font-size: 15px;
    font-weight: 600;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    white-space: nowrap;
    text-align: center;
    background-image: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    user-select: none;
    touch-action: none;
    height: 32px;
    padding: 4px 15px;
    font-size: 14px;
    border-radius: var(--border-radius-sm);
    gap: 8px;
}

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

.btn-secondary {
    color: var(--text-main);
    background-color: #fff;
    border-color: #d9d9d9;
}
.btn-secondary:hover {
    color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-danger {
    color: #fff;
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}
.btn-danger:hover {
    background-color: var(--danger-hover);
    border-color: var(--danger-hover);
    color: #fff;
}

.btn-sm {
    height: 24px;
    padding: 0 7px;
    font-size: 14px;
    border-radius: 4px;
}

/* 表格 */
.table-wrapper {
    overflow-x: auto;
}
.table {
    width: 100%;
    text-align: left;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border-collapse: separate;
    border-spacing: 0;
}
.table th {
    background: #fafafa;
    color: var(--text-main);
    font-weight: 600;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}
.table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
}
.table tr:hover td {
    background: #fafafa;
}

/* 表单 */
.form-group {
    margin-bottom: 24px;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
}
.input, .select, .textarea {
    box-sizing: border-box;
    margin: 0;
    padding: 4px 11px;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5714285714285714;
    background-color: #ffffff;
    background-image: none;
    border: 1px solid #d9d9d9;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
    width: 100%;
}
.input:hover, .select:hover, .textarea:hover {
    border-color: var(--primary-hover);
}
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
}
.input[readonly] {
    background-color: rgba(0, 0, 0, 0.04);
    cursor: not-allowed;
}
.textarea {
    min-height: 80px;
    resize: vertical;
}

/* 标签 */
.tag {
    box-sizing: border-box;
    margin: 0 8px 0 0;
    padding: 0 7px;
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
    background: #fafafa;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    display: inline-block;
}
.tag-success {
    color: #389e0d;
    background: #f6ffed;
    border-color: #b7eb8f;
}
.tag-error {
    color: #cf1322;
    background: #fff1f0;
    border-color: #ffa39e;
}
.tag-processing {
    color: #0958d9;
    background: #e6f4ff;
    border-color: #91caff;
}

/* 提示框 */
.alert {
    padding: 8px 15px;
    margin-bottom: 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid transparent;
}
.alert-success {
    background-color: #f6ffed;
    border-color: #b7eb8f;
    color: var(--text-main);
}
.alert-error {
    background-color: #fff1f0;
    border-color: #ffa39e;
    color: var(--text-main);
}
.alert-info {
    background-color: #e6f4ff;
    border-color: #91caff;
    color: var(--text-main);
}

/* 数据概览卡片 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-base);
    border: 1px solid var(--border-color);
}
.stat-title {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}
.stat-value {
    color: var(--text-main);
    font-size: 30px;
    font-weight: 600;
}

/* ==========================================================================
   企业级居中卡片登录页 (Enterprise Login Layout)
   ========================================================================== */
.login-layout {
    display: flex;
    min-height: 100vh;
    background: #e5e7eb;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    display: flex;
    width: 100%;
    max-width: 880px;
    min-height: 520px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.login-sider {
    flex: 1;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--text-main);
    padding: 48px;
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--border-color);
}

/* 左侧科技感装饰图形 */
.login-sider::before {
    display: none;
}

.login-sider::after {
    display: none;
}

.login-sider-shape {
    display: none;
}

.login-sider-shape::after {
    display: none;
}

.login-sider-content {
    position: relative;
    z-index: 1;
    max-width: 320px;
}

.login-sider-title {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 14px;
    line-height: 1.3;
    letter-spacing: 0;
}

.login-sider-desc {
    font-size: 15px;
    color: var(--text-secondary);
    opacity: 1;
    line-height: 1.6;
}

.login-main {
    width: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    background: #fff;
    z-index: 2;
}

.login-header {
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 6px 0;
}

.login-header p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 13px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-label {
    font-size: 13px;
    margin-bottom: 6px;
}

.login-form .input {
    padding: 8px 12px;
    font-size: 14px;
    height: 40px;
}

.login-form .btn {
    width: 100%;
    height: 40px;
    font-size: 15px;
    margin-top: 8px;
}

@media (max-width: 800px) {
    .login-card {
        flex-direction: column;
        height: auto;
        max-width: 420px;
    }
    .login-sider {
        padding: 40px 30px;
        text-align: center;
    }
    .login-sider-content {
        padding-left: 0;
    }
    .login-sider-shape {
        display: none;
    }
    .login-main {
        width: 100%;
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .admin-sider {
        position: fixed;
        left: -256px;
        height: 100vh;
    }
    .admin-sider.is-open {
        left: 0;
    }
    .admin-container {
        width: 100%;
    }
}

.meeting-layout.is-mobile-layout {
    background: #f3f4f6;
}

.meeting-layout.is-mobile-layout .meeting-header {
    height: auto;
    min-height: 64px;
    padding: 10px 12px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
}

.meeting-layout.is-mobile-layout .meeting-header-info,
.meeting-layout.is-mobile-layout .header-right {
    width: 100%;
}

.meeting-layout.is-mobile-layout .header-right {
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.meeting-layout.is-mobile-layout .meeting-title {
    font-size: 15px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meeting-layout.is-mobile-layout .global-voice-status,
.meeting-layout.is-mobile-layout .online-status {
    max-width: 100%;
}

.meeting-layout.is-mobile-layout .meeting-sidebar {
    width: 100%;
    z-index: 30;
}

.meeting-layout.is-mobile-layout .meeting-main {
    padding: 0;
    margin-right: 0 !important;
    gap: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
}

.meeting-layout.is-mobile-layout .participant-grid {
    display: flex;
    order: 2;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 86px;
    min-height: 86px;
    padding: 6px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: rgba(15, 23, 42, 0.92);
}

.meeting-layout.is-mobile-layout .participant-grid-remote {
    display: flex;
    flex-direction: row;
    gap: 6px;
}

.meeting-layout.is-mobile-layout .video-stage {
    order: 1;
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    border-radius: 0;
    aspect-ratio: auto;
    max-height: none;
    background: #000;
    border: none;
    box-shadow: none;
    overflow: hidden;
    margin: 0;
}

.meeting-layout.is-mobile-layout .video-stage-empty {
    min-height: 0;
    height: 100%;
    font-size: 12px;
    padding: 16px;
    color: #94a3b8;
    background: #1e293b;
}

.meeting-layout.is-mobile-layout .video-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

.meeting-layout.is-mobile-layout .participant-card {
    flex: 0 0 72px;
    width: 72px;
    min-width: 72px;
    aspect-ratio: 1;
    min-height: 72px;
    border-radius: 14px;
    scroll-snap-align: start;
    background: linear-gradient(180deg, rgba(51, 65, 85, 0.96), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.meeting-layout.is-mobile-layout .avatar-circle {
    width: 28px;
    height: 28px;
    font-size: 12px;
    margin-bottom: 0;
}

.meeting-layout.is-mobile-layout .participant-name {
    font-size: 9px;
    padding: 2px 4px;
    bottom: 3px;
    left: 3px;
    right: 3px;
    gap: 3px;
    justify-content: space-between;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meeting-layout.is-mobile-layout .video-feed-card {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    aspect-ratio: auto;
    border-radius: 0;
    border: none;
    background: #000;
    position: relative;
}

.meeting-layout.is-mobile-layout .video-feed-card.source-screen_share {
    flex: 1 1 auto;
}

.meeting-layout.is-mobile-layout .video-feed-slot video {
    object-fit: contain;
    background: #000;
}

.meeting-layout.is-mobile-layout .video-feed-label {
    left: 8px;
    right: 8px;
    bottom: 8px;
    font-size: 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
}

.meeting-layout.is-mobile-layout .meeting-footer {
    padding: 0 6px;
    height: 74px;
}

.meeting-layout.is-mobile-layout .footer-left,
.meeting-layout.is-mobile-layout .footer-center,
.meeting-layout.is-mobile-layout .footer-right {
    gap: 4px;
}

.meeting-layout.is-mobile-layout .footer-left {
    flex: 1;
    min-width: 0;
}

.meeting-layout.is-mobile-layout .audio-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    max-width: 100%;
}

.meeting-layout.is-mobile-layout .footer-center {
    flex: 0 0 auto;
}

.meeting-layout.is-mobile-layout .control-btn {
    min-width: 44px;
    padding: 4px;
}

.meeting-layout.is-mobile-layout .control-label {
    font-size: 10px;
}

.meeting-layout.is-mobile-layout .leave-btn {
    padding: 6px 10px;
    font-size: 12px;
}

.meeting-layout.is-mobile-layout .participant-grid::-webkit-scrollbar,
.meeting-layout.is-mobile-layout .audio-controls::-webkit-scrollbar {
    display: none;
}
/* 清理掉旧的样式，避免冲突 */
.panel {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 24px;
}
.panel-title {
    margin: 0 0 16px 0;
    font-size: 16px;
}
.list-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}
.hint {
    color: var(--text-secondary);
    font-size: 14px;
}
.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f0f0;
    color: var(--text-secondary);
    border-radius: 10px;
    font-size: 12px;
}
.badge-success {
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}
.badge-error {
    background: #fff1f0;
    color: #cf1322;
    border: 1px solid #ffa39e;
}

.meeting-code {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.room-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
}

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

.video-card {
    padding: 18px;
}

.video-stage {
    width: 100%;
    height: 280px;
    background: #111827;
    border-radius: 18px;
    object-fit: cover;
}

.video-placeholder {
    width: 100%;
    height: 280px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e5e7eb 0%, #f8fafc 100%);
    color: #6b7280;
}

.video-title {
    margin: 0 0 12px;
    font-size: 16px;
}

.side-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.chat-box {
    height: 360px;
    overflow-y: auto;
    padding: 8px 0;
}

.chat-item {
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
}

.chat-meta {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 6px;
}

.room-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

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

.voice-grid-remote {
    display: contents;
}

.voice-card {
    min-height: 136px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.voice-card.is-self {
    border-color: #c7d2fe;
    background: linear-gradient(180deg, #eef2ff 0%, #ffffff 100%);
}

.voice-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.voice-meta {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 14px;
}

.voice-state {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #111827;
    font-size: 13px;
    font-weight: 600;
}

.empty {
    color: #9ca3af;
    padding: 18px 0;
}

@media (max-width: 1100px) {
    .app-shell,
    .room-shell,
    .grid-3,
    .grid-2,
    .form-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .content {
        padding: 18px;
    }

    .page-header {
        flex-direction: column;
    }
}

/* 隐藏外层滚动条 */
body:has(.meeting-layout) {
    overflow: hidden;
}
.meeting-layout {
    display: flex;
    flex-direction: column;
    position: relative;
    /* 修复移动端 100vh 坍塌问题，使用 fallback */
    height: 100vh;
    height: 100dvh;
    background-color: #1a1a1a;
    color: #ffffff;
    overflow: hidden;
}

/* 顶部信息栏 */
.meeting-header {
    height: 48px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(26, 26, 26, 0.9);
    border-bottom: 1px solid #333;
    z-index: 10;
}

.meeting-header-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* 全局语音状态指示器 */
.global-voice-status {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #fff;
    transition: all 0.3s ease;
}

.global-voice-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ff4d4f; /* 初始红色 */
    box-shadow: none;
    animation: none;
}

.global-voice-status.is-connected .status-dot {
    background-color: #52c41a; /* 连接成功变绿 */
    box-shadow: none;
    animation: none;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(255, 77, 79, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 77, 79, 0); }
}

.meeting-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: #fff;
}

.meeting-subtitle {
    font-size: 11px;
    color: #999;
}

/* 中间主会场 */
.meeting-main {
    flex: 1;
    position: relative;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    overflow: hidden;
    transition: margin-right 0.3s ease;
}

.video-stage {
    order: 2;
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(15, 23, 42, 0.8));
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.video-stage-empty {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
    padding: 24px;
}

.video-stage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-flow: dense;
    grid-auto-rows: minmax(220px, 1fr);
    flex: 1 1 auto;
    width: 100%;
    gap: 0;
    padding: 0;
    height: 100%;
    min-height: 0;
    align-items: stretch;
}

.video-stage-grid.feed-count-1 {
    grid-template-columns: minmax(0, 1fr);
}

.video-stage-grid.feed-count-1 .video-feed-card {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.video-stage-grid.has-screen-share {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: #ffffff;
}

.video-stage-grid.has-screen-share .video-feed-card.source-screen_share {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 0;
    background: #ffffff;
    border: none;
    box-shadow: none;
}

.video-feed-card {
    position: relative;
    display: flex;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.video-feed-card.source-screen_share {
    aspect-ratio: auto;
    grid-column: 1 / -1;
    min-height: 0;
}

.video-feed-slot {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: #000;
}

.video-feed-slot video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

.video-stage-grid.has-screen-share .video-feed-slot,
.video-stage-grid.has-screen-share .video-feed-slot video {
    background: #ffffff;
}

.video-feed-slot video.is-mirrored {
    transform: scaleX(-1);
}

.video-feed-label {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    z-index: 1;
}

.video-feed-card:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    aspect-ratio: auto;
    border-radius: 0;
    border: none;
    background: #000;
}

.video-feed-card:fullscreen .video-feed-slot video {
    object-fit: contain;
    background: #000;
}

/* 参会者网格布局 */
.participant-grid {
    order: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 78px;
    min-width: 78px;
    max-width: 78px;
    min-height: 0;
    padding: 6px 3px 6px 6px;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: stretch;
    justify-content: flex-start;
    scrollbar-width: none;
}

.participant-grid-remote {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 参会者卡片 */
.participant-card {
    background-color: #2a2a2a;
    border-radius: 12px;
    aspect-ratio: 3 / 4;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.participant-card.is-self {
    border-color: #4a4a4a;
}

.participant-card:hover {
    border-color: #555;
}

.participant-grid::-webkit-scrollbar {
    display: none;
}

.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .meeting-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.52));
    border-bottom: none;
    pointer-events: none;
}

.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .meeting-header > * {
    pointer-events: auto;
}

.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .meeting-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.56));
    border-top: none;
    pointer-events: none;
}

.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .meeting-footer > * {
    pointer-events: auto;
}

.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .meeting-main {
    position: absolute;
    inset: 0;
    height: 100%;
    z-index: 1;
}

.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .participant-grid {
    display: none;
}

.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .video-stage {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    border-left: none;
    background: #000;
}

.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .video-stage-grid.has-screen-share {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex !important;
    flex: none;
    background: #000;
}

.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .video-stage-grid.has-screen-share .video-feed-card.source-screen_share {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    min-height: 100%;
    background: #000;
}

.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .video-stage-grid.has-screen-share .video-feed-slot,
.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .video-stage-grid.has-screen-share .video-feed-slot video {
    background: #000;
}

.meeting-layout.desktop-screen-share-active:not(.meeting-layout-v2) .video-feed-label {
    bottom: 72px;
}

/* 默认头像圆圈 */
.avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #4a4a4a;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

/* 名字和麦克风状态 */
.participant-name {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 2px 4px;
    border-radius: 6px;
    font-size: 9px;
    display: flex;
    align-items: center;
    gap: 3px;
    justify-content: space-between;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 麦克风图标 (用 CSS 绘制简单图标) */
.mic-icon {
    width: 14px;
    height: 18px;
    position: relative;
    border: 1px solid #4ade80;
    border-radius: 7px;
    background-color: transparent;
}
.mic-icon::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 2px;
    width: 8px;
    height: 6px;
    border-bottom: 1px solid #4ade80;
    border-radius: 0 0 4px 4px;
}
.mic-icon.muted {
    border-color: #ef4444;
}
.mic-icon.muted::before {
    border-color: #ef4444;
}
.mic-icon.muted::after {
    content: '';
    position: absolute;
    top: 8px;
    left: -2px;
    width: 16px;
    height: 1px;
    background-color: #ef4444;
    transform: rotate(45deg);
}

/* 底部控制栏 */
.meeting-footer {
    height: 58px;
    background-color: #222;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    border-top: 1px solid #333;
    z-index: 10;
}

.footer-left, .footer-center, .footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-center {
    flex: 1;
    justify-content: center;
}

/* 控制按钮 */
.control-btn {
    background: transparent;
    border: none;
    color: #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 50px;
    cursor: pointer;
    border-radius: 8px;
    padding: 4px;
    transition: all 0.2s;
}

.control-btn:hover {
    background-color: #333;
    color: #fff;
}

.control-btn.is-active,
.control-btn.btn-primary {
    background-color: rgba(37, 99, 235, 0.2);
    color: #fff;
}

.control-btn.is-danger {
    color: #ef4444;
}
.control-btn.is-danger:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.control-label {
    font-size: 10px;
}

.icon-mic-on, .icon-mic-off, .icon-speaker, .icon-members, .icon-chat, .icon-camera, .icon-screen {
    width: 24px;
    height: 24px;
    background-color: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

/* 用 SVG Data URI 替代复杂的 CSS 画图，更精确 */
.icon-mic-on {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="22"></line></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"></path><path d="M19 10v2a7 7 0 0 1-14 0v-2"></path><line x1="12" y1="19" x2="12" y2="22"></line></svg>');
}

.icon-mic-off {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="2" y1="2" x2="22" y2="22"></line><path d="M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"></path><path d="M5 10v2a7 7 0 0 0 12 5"></path><path d="M15 9.34V5a3 3 0 0 0-5.68-1.33"></path><path d="M9 9v3a3 3 0 0 0 5.12 1.56"></path><line x1="12" y1="19" x2="12" y2="22"></line></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="2" y1="2" x2="22" y2="22"></line><path d="M18.89 13.23A7.12 7.12 0 0 0 19 12v-2"></path><path d="M5 10v2a7 7 0 0 0 12 5"></path><path d="M15 9.34V5a3 3 0 0 0-5.68-1.33"></path><path d="M9 9v3a3 3 0 0 0 5.12 1.56"></path><line x1="12" y1="19" x2="12" y2="22"></line></svg>');
}

.icon-speaker {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14"></path><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14"></path><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>');
}

.icon-members {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>');
}

.icon-chat {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path></svg>');
}

.icon-camera {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M23 7l-7 5 7 5V7z"></path><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M23 7l-7 5 7 5V7z"></path><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>');
}

.icon-screen {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>');
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="20" height="14" rx="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>');
}

/* 离开按钮 */
.leave-btn {
    background-color: #ef4444;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.leave-btn:hover {
    background-color: #dc2626;
}

/* 右侧侧边栏 */
.meeting-sidebar {
    position: absolute;
    top: 60px;
    right: 0;
    bottom: 80px;
    width: 320px;
    background-color: #fff;
    color: #333;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e5e7eb;
    box-shadow: -4px 0 16px rgba(0,0,0,0.1);
    z-index: 20;
}

.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 16px;
    align-items: center;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab-btn.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0 8px;
}
.tab-close-btn:hover {
    color: #333;
}

.sidebar-panel {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-panel.is-active {
    display: flex;
}

/* 聊天面板 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    resize: none;
}

.chat-actions {
    display: flex;
    justify-content: flex-end;
}

/* 成员面板 */
.member-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.member-item:hover {
    background-color: #f3f4f6;
}

.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.member-info {
    flex: 1;
}

.member-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

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

.member-actions {
    display: flex;
    gap: 4px;
}

.member-actions .btn {
    font-size: 12px;
    padding: 4px 8px;
}

@media (max-width: 768px) {
    .meeting-layout {
        background:
            radial-gradient(circle at top, rgba(37, 99, 235, 0.16), transparent 32%),
            #111827;
    }

    .meeting-header {
        height: auto;
        min-height: 64px;
        padding: 10px 12px;
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .meeting-header-info,
    .header-right {
        width: 100%;
    }

    .header-right {
        justify-content: space-between;
        gap: 8px;
        flex-wrap: wrap;
    }

    .meeting-title {
        font-size: 15px;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .global-voice-status,
    .online-status {
        max-width: 100%;
    }

    .meeting-sidebar {
        width: 100%;
        /* 移动端侧边栏弹出时覆盖整个主区域 */
        z-index: 30;
    }
    .meeting-main {
        padding: 0;
        /* 移动端不通过 margin-right 挤压主视图，直接被侧边栏盖住 */
        margin-right: 0 !important;
        gap: 0;
        overflow: hidden;
        overscroll-behavior: contain;
        flex-direction: column;
        align-items: stretch;
        justify-content: stretch;
    }
    
    .participant-grid {
        display: flex;
        order: 2;
        flex-direction: row;
        align-items: stretch;
        justify-content: flex-start;
        gap: 6px;
        width: 100%;
        min-width: 0;
        max-width: none;
        height: 86px;
        min-height: 86px;
        padding: 6px 8px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background: rgba(15, 23, 42, 0.92);
    }

    .participant-grid-remote {
        display: flex;
        flex-direction: row;
        gap: 6px;
    }

    .video-stage {
        order: 1;
        width: 100%;
        min-height: 0;
        flex: 1 1 auto;
        border-radius: 0;
        aspect-ratio: auto;
        max-height: none;
        background: #ffffff;
        border: none;
        box-shadow: none;
        overflow: hidden;
    }

    .video-stage-empty {
        min-height: 0;
        height: 100%;
        font-size: 12px;
        padding: 16px;
        color: #64748b;
        background: linear-gradient(180deg, #ffffff, #f8fafc);
    }

    .video-stage-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        height: 100%;
        overflow: hidden;
        align-content: stretch;
    }

    .participant-card {
        flex: 0 0 72px;
        width: 72px;
        min-width: 72px;
        aspect-ratio: 1;
        min-height: 72px;
        border-radius: 14px;
        scroll-snap-align: start;
        background: linear-gradient(180deg, rgba(51, 65, 85, 0.96), rgba(15, 23, 42, 0.98));
        border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .avatar-circle {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-bottom: 0;
    }

    .participant-name {
        font-size: 9px;
        padding: 2px 4px;
        bottom: 3px;
        left: 3px;
        right: 3px;
        gap: 3px;
        justify-content: space-between;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .video-feed-card {
        flex: 1 1 auto;
        aspect-ratio: 9 / 16;
        min-height: 0;
        border-radius: 0;
        border: none;
        background: #ffffff;
    }

    .video-feed-slot video {
        object-fit: contain;
        background: #ffffff;
    }

    .video-feed-label {
        left: 10px;
        right: 10px;
        bottom: 10px;
        font-size: 11px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        background: rgba(255, 255, 255, 0.92);
        color: #0f172a;
        border: 1px solid rgba(15, 23, 42, 0.08);
    }

    .meeting-footer {
        padding: 0 6px;
        height: 74px;
    }

    .footer-left, .footer-center, .footer-right {
        gap: 4px;
    }

    .footer-left {
        flex: 1;
        min-width: 0;
    }

    .audio-controls {
        display: flex;
        align-items: center;
        gap: 2px;
        overflow-x: auto;
        max-width: 100%;
    }

    .footer-center {
        flex: 0 0 auto;
    }

    .control-btn {
        min-width: 44px;
        padding: 4px;
    }

    .participant-grid::-webkit-scrollbar,
    .audio-controls::-webkit-scrollbar {
        display: none;
    }


    .control-label {
        font-size: 10px;
    }

    .leave-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .meeting-subtitle {
        font-size: 10px;
    }
}
