.organization-admin-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
}

.organization-admin-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.organization-sidebar,
.organization-main-panel {
    min-width: 0;
}

.organization-admin-card {
    background: rgba(26, 26, 46, 0.4);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    margin-bottom: 1.5rem;
}

.organization-admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.organization-admin-card-title {
    margin: 0;
    color: #00d4ff;
    font-size: 1.1rem;
}

.organization-permission-note {
    color: #94a3b8;
    font-size: 0.85rem;
    text-align: right;
}

.organization-admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.organization-sidebar-item,
.organization-admin-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(12, 14, 26, 0.42);
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.organization-sidebar-item {
    cursor: pointer;
    transition: all 0.2s ease;
}

.organization-sidebar-item:hover,
.organization-sidebar-item.active {
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.12);
}

.organization-sidebar-name,
.admin-row-title {
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.organization-member-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.organization-member-text {
    min-width: 0;
}

.organization-member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(0, 212, 255, 0.18);
}

.organization-sidebar-meta,
.admin-row-meta {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.45;
}

.organization-sidebar-tags,
.admin-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

.organization-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-value-text {
    font-size: 1.15rem;
    line-height: 1.35;
}

.admin-badge {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 212, 255, 0.12);
    color: #7dd3fc;
    font-size: 0.75rem;
    font-weight: 600;
}

.admin-badge.muted {
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

.admin-badge.success {
    background: rgba(74, 222, 128, 0.14);
    color: #86efac;
}

.admin-badge.danger {
    background: rgba(248, 113, 113, 0.14);
    color: #fca5a5;
}

.detail-empty-state {
    min-height: 240px;
}

.admin-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-inline-actions .btn {
    min-width: auto;
}

.admin-row-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.admin-row-form select,
.admin-row-form input {
    min-width: 140px;
}

.create-organization-modal-content {
    max-width: 560px;
}

.shared-chat-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.shared-chat-sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

.shared-chat-filter-form {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1.4rem;
}

.shared-chat-list-header {
    margin-top: 0.25rem;
}

.shared-chat-list {
    max-height: 56vh;
    overflow: auto;
    padding-right: 0.25rem;
}

.shared-chat-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    background: rgba(12, 14, 26, 0.42);
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.shared-chat-row:hover,
.shared-chat-row.active {
    border-color: rgba(0, 212, 255, 0.35);
    box-shadow: 0 0 18px rgba(0, 212, 255, 0.12);
}

.shared-chat-row-main {
    min-width: 0;
}

.shared-chat-detail-card {
    min-height: 640px;
}

.shared-chat-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.12);
    margin-bottom: 1rem;
}

.shared-chat-detail-kicker {
    color: #7dd3fc;
    font-size: 0.86rem;
    margin-bottom: 0.35rem;
}

.shared-chat-detail-header h2 {
    margin: 0;
    color: #e2e8f0;
    font-size: 1.28rem;
}

.shared-chat-detail-header p {
    margin: 0.5rem 0 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.shared-chat-empty-detail {
    min-height: 360px;
    display: grid;
    place-items: center;
}

.shared-chat-messages {
    display: grid;
    gap: 1rem;
}

.shared-chat-message {
    display: grid;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(12, 14, 26, 0.42);
}

.shared-chat-message.user {
    border-color: rgba(74, 222, 128, 0.16);
}

.shared-chat-message.assistant {
    border-color: rgba(125, 211, 252, 0.18);
}

.shared-chat-message-meta {
    color: #7dd3fc;
    font-size: 0.82rem;
    font-weight: 600;
}

.shared-chat-message-content {
    color: #e2e8f0;
    line-height: 1.72;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.shared-chat-message-content > :first-child {
    margin-top: 0;
}

.shared-chat-message-content > :last-child {
    margin-bottom: 0;
}

.shared-chat-message-content.markdown-body {
    background: transparent;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.shared-chat-message-content.markdown-body pre {
    background: rgba(2, 8, 23, 0.72);
}

.shared-chat-message-content.markdown-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
}

.shared-chat-message-content.markdown-body a {
    color: #7dd3fc;
}

.shared-chat-message-content.markdown-body .katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.25rem 0;
}

.shared-chat-citations {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.shared-chat-citation {
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(125, 211, 252, 0.14);
}

.shared-chat-citation strong {
    color: #bae6fd;
    font-size: 0.84rem;
}

.shared-chat-citation span,
.shared-chat-citation p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.82rem;
    line-height: 1.5;
}

@media (max-width: 1080px) {
    .organization-admin-layout {
        grid-template-columns: 1fr;
    }

    .shared-chat-layout {
        grid-template-columns: 1fr;
    }

    .shared-chat-sidebar {
        position: static;
        max-height: none;
    }

    .organization-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .organization-admin-container {
        padding: 1rem;
    }

    .organization-admin-card-header,
    .organization-sidebar-item,
    .organization-admin-row,
    .shared-chat-detail-header,
    .shared-chat-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .organization-sidebar-tags,
    .admin-row-actions {
        justify-content: flex-start;
    }

    .admin-form-grid,
    .organization-summary-grid {
        grid-template-columns: 1fr;
    }
}