:root {
	--rc-red: #f5455c;
	--rc-red-hover: #d83449;
	--rc-primary: #0369a1;
	--rc-primary-hover: #0284c7;
	--rc-dark-bg: #1f2329;
	--rc-sidebar-bg: #1b1d21;
	--rc-sidebar-hover: #262931;
	--rc-sidebar-active: #2f343d;
	--rc-border: #e1e5e8;
	--rc-text-primary: #1f2329;
	--rc-text-secondary: #525861;
	--rc-text-sidebar: #cbced1;
	--rc-bg: #ffffff;
	--rc-card-bg: #ffffff;
	--rc-bubble-bg: #f7f8fa;
	--rc-hover-bg: #f2f3f5;
	--rc-input-bg: #ffffff;
	--rc-panel-bg: #ffffff;
	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 12px;
}

:root[data-theme="dark"] {
	--rc-dark-bg: #15181c;
	--rc-sidebar-bg: #111315;
	--rc-sidebar-hover: #1f2329;
	--rc-sidebar-active: #2f343d;
	--rc-border: #2f343d;
	--rc-text-primary: #f2f3f5;
	--rc-text-secondary: #9ea2a8;
	--rc-text-sidebar: #e4e7ea;
	--rc-bg: #1a1d21;
	--rc-card-bg: #22262b;
	--rc-bubble-bg: #23272d;
	--rc-hover-bg: #2a2e35;
	--rc-input-bg: #15181c;
	--rc-panel-bg: #1a1d21;
}

:root[data-theme="high-contrast"] {
	--rc-dark-bg: #000000;
	--rc-sidebar-bg: #000000;
	--rc-sidebar-hover: #1a1a1a;
	--rc-sidebar-active: #333333;
	--rc-border: #ffffff;
	--rc-text-primary: #ffffff;
	--rc-text-secondary: #e0e0e0;
	--rc-text-sidebar: #ffffff;
	--rc-bg: #000000;
	--rc-card-bg: #0a0a0a;
	--rc-bubble-bg: #111111;
	--rc-hover-bg: #222222;
	--rc-input-bg: #000000;
	--rc-panel-bg: #000000;
}

html[data-font-size="small"] {
	font-size: 87.5%;
}
html[data-font-size="medium"] {
	font-size: 112.5%;
}
html[data-font-size="large"] {
	font-size: 125%;
}
html[data-font-size="extralarge"] {
	font-size: 150%;
}

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

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--rc-text-primary);
	background: var(--rc-bg);
	height: 100vh;
	overflow: hidden;
}

/* Modal / Auth */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	backdrop-filter: blur(4px);
}

.modal-card {
	background: #ffffff;
	width: 100%;
	max-width: 420px;
	border-radius: var(--radius-lg);
	padding: 32px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.logo-header {
	text-align: center;
	margin-bottom: 24px;
}

.rc-logo {
	width: 48px;
	height: 48px;
	margin-bottom: 12px;
}

.logo-header h1 {
	font-size: 24px;
	font-weight: 700;
	color: var(--rc-dark-bg);
}

.subtitle {
	font-size: 13px;
	color: #475569;
	margin-top: 4px;
}

.tab-buttons {
	display: flex;
	margin-bottom: 20px;
	border-bottom: 2px solid #eaeaea;
}

.tab {
	flex: 1;
	background: none;
	border: none;
	padding: 10px;
	font-size: 14px;
	font-weight: 600;
	color: #475569;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}

.tab.active {
	color: #c5221f;
	border-color: #c5221f;
}

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

.form-group label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	margin-bottom: 6px;
	text-transform: uppercase;
	color: #334155;
}

.form-group input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #dcdfe6;
	border-radius: var(--radius-md);
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s;
}

.form-group input:focus {
	border-color: var(--rc-red);
}

.error-msg {
	color: var(--rc-red);
	font-size: 13px;
	margin-bottom: 12px;
	min-height: 18px;
}

.btn {
	padding: 10px 16px;
	border: none;
	border-radius: var(--radius-md);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s;
}

.btn-primary {
	background: #d83449;
	color: #ffffff;
}

.btn-primary:hover {
	background: #be263a;
}

.auth-legal-links {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
	font-size: 12px;
}

.auth-legal-links a {
	color: #334155;
	text-decoration: underline;
	transition: color 0.15s;
}

.auth-legal-links a:hover {
	color: #0f172a;
	text-decoration: underline;
}

.auth-legal-links .dot-sep {
	color: #64748b;
}

.auth-footer {
	text-align: center;
	font-size: 11px;
	color: #475569;
	margin-top: 12px;
}

/* App Layout */
.app-layout {
	display: flex;
	height: 100vh;
	width: 100vw;
}

/* Sidebar */
.sidebar {
	width: 260px;
	background: var(--rc-sidebar-bg);
	color: var(--rc-text-sidebar);
	display: flex;
	flex-direction: column;
	border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header {
	padding: 12px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	position: relative;
	gap: 8px;
}

.btn-sidebar-home {
	background: transparent;
	border: none;
	color: var(--rc-text-sidebar);
	padding: 6px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition:
		background 0.15s,
		color 0.15s;
	flex-shrink: 0;
}

.btn-sidebar-home:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #ffffff;
}

.user-profile-menu {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 1;
	min-width: 0;
	padding: 4px 6px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background 0.15s;
}

.user-profile-menu:hover {
	background: rgba(255, 255, 255, 0.08);
}

.user-profile {
	display: flex;
	align-items: center;
	gap: 10px;
}

.avatar-container {
	position: relative;
	width: 36px;
	height: 36px;
}

.avatar {
	width: 36px;
	height: 36px;
	border-radius: var(--radius-sm);
	object-fit: cover;
}

.avatar-container .status-indicator {
	position: absolute;
	bottom: -2px;
	right: -2px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid var(--rc-sidebar-bg);
}

.user-info {
	display: flex;
	flex-direction: column;
}

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

.status-text {
	font-size: 12px;
	color: #9ea2a8;
}

.user-menu-chevron {
	color: #9ea2a8;
	transition: transform 0.2s;
}

/* User Popover Dropdown */
.user-menu-dropdown {
	position: absolute;
	top: 58px;
	left: 12px;
	width: 220px;
	background: #ffffff;
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-md);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	padding: 6px 0;
	z-index: 200;
}

.user-menu-section-header {
	padding: 10px 16px 6px;
	display: flex;
	flex-direction: column;
}

.user-menu-section-header strong {
	font-size: 14px;
	color: var(--rc-text-primary);
}

.sidebar-search {
	padding: 10px 12px 4px;
}

.sidebar-search input {
	width: 100%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--radius-sm);
	color: #fff;
	padding: 6px 10px;
	font-size: 13px;
	outline: none;
}

.sidebar-search input:focus {
	border-color: var(--rc-red);
}

.channels-section {
	padding: 12px 12px 6px;
	flex: 1;
	overflow-y: auto;
}

.section-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #9ea2a8;
	margin-bottom: 8px;
	padding: 0 8px;
}

.btn-add {
	background: none;
	border: none;
	color: #9ea2a8;
	font-size: 16px;
	cursor: pointer;
	padding: 0 4px;
}

.btn-add:hover {
	color: #fff;
}

.room-list {
	list-style: none;
}

.room-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	font-size: 14px;
	color: #cbced1;
	transition: background 0.15s;
}

.room-item:hover {
	background: var(--rc-sidebar-hover);
	color: #fff;
}

.room-item.active {
	background: var(--rc-sidebar-active);
	color: #fff;
	font-weight: 600;
}

.room-prefix {
	font-weight: 700;
	opacity: 0.7;
}

.sidebar-footer {
	padding: 12px 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12px;
}

.cf-badge {
	background: rgba(245, 69, 92, 0.2);
	color: #f5455c;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
}

.status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #888;
}

.status-dot.connected {
	background: #2de0a5;
	box-shadow: 0 0 6px #2de0a5;
}

/* Chat Main Area */
.chat-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: var(--rc-bg);
	min-width: 0;
}

.chat-header {
	height: 60px;
	border-bottom: 1px solid var(--rc-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 24px;
}

.room-title {
	display: flex;
	align-items: center;
	gap: 8px;
}

.room-title .hash {
	font-size: 20px;
	color: var(--rc-text-secondary);
}

.room-title h2 {
	font-size: 17px;
	font-weight: 700;
}

.room-topic {
	font-size: 13px;
	color: var(--rc-text-secondary);
	margin-left: 12px;
}

.room-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.btn-action {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: transparent;
	border: 1px solid transparent;
	width: 34px;
	height: 34px;
	border-radius: var(--radius-sm);
	font-size: 13px;
	font-weight: 500;
	color: #6c727a;
	cursor: pointer;
	transition: all 0.15s;
}

.btn-action:hover {
	background: #f2f3f5;
	color: #1f2329;
}

.badge {
	background: #eceef0;
	padding: 2px 6px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	color: var(--rc-text-secondary);
}

/* Kebab Overflow Menu */
.kebab-menu-container {
	position: relative;
}

.kebab-dropdown {
	position: absolute;
	top: 40px;
	right: 0;
	width: 220px;
	background: #ffffff;
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-md);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	padding: 6px 0;
	z-index: 150;
}

.kebab-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 500;
	color: var(--rc-text-primary);
	cursor: pointer;
	transition: background 0.15s;
}

.kebab-item:hover {
	background: var(--rc-hover-bg);
}

.kebab-icon {
	font-size: 14px;
	width: 18px;
	text-align: center;
}

.kebab-divider {
	height: 1px;
	background: var(--rc-border);
	margin: 6px 0;
}

/* AI Summary Card */
.ai-summary-card {
	margin: 12px 24px 0;
	background: #f0f6ff;
	border: 1px solid #bfdbfe;
	border-radius: var(--radius-md);
	padding: 12px 16px;
}

.ai-summary-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	font-weight: 700;
	color: #1d4ed8;
	margin-bottom: 6px;
}

.ai-summary-body {
	font-size: 13px;
	color: #1e3a8a;
	line-height: 1.5;
	white-space: pre-wrap;
}

.btn-close {
	background: none;
	border: none;
	font-size: 14px;
	cursor: pointer;
	color: #1d4ed8;
}

/* Messages */
.messages-container {
	flex: 1;
	overflow-y: auto;
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.message-item {
	display: flex;
	gap: 12px;
	line-height: 1.45;
	position: relative;
	padding: 4px 8px;
	border-radius: var(--radius-sm);
	transition: background 0.1s;
	content-visibility: auto;
	contain-intrinsic-size: 0 48px;
}

.message-item:hover {
	background: var(--rc-bubble-bg);
}

.message-item:hover .msg-actions {
	display: flex;
}

.msg-avatar {
	width: 36px;
	height: 36px;
	border-radius: 4px;
	flex-shrink: 0;
}

.msg-content {
	flex: 1;
	min-width: 0;
}

.msg-header {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 4px;
}

.msg-author {
	font-weight: 700;
	font-size: 14px;
}

.msg-role-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 1px 6px;
	border-radius: 4px;
	letter-spacing: 0.3px;
	line-height: 1.3;
}

.msg-role-badge.admin {
	background: #fee2e2;
	color: #dc2626;
	border: 1px solid #fca5a5;
}

.msg-role-badge.user {
	background: #f1f5f9;
	color: #475569;
	border: 1px solid #e2e8f0;
}

.msg-time {
	font-size: 12px;
	color: var(--rc-text-secondary);
}

.msg-edited {
	font-size: 11px;
	color: var(--rc-text-secondary);
	font-style: italic;
}

.read-receipt {
	font-size: 12px;
	color: #2de0a5;
	margin-left: 4px;
}

.msg-text {
	font-size: 14px;
	word-break: break-word;
}

/* Reactions */
.reactions-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 6px;
}

.reaction-pill {
	display: flex;
	align-items: center;
	gap: 4px;
	background: #ffffff;
	border: 1px solid var(--rc-border);
	border-radius: 12px;
	padding: 2px 8px;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.15s;
}

.reaction-pill:hover {
	border-color: var(--rc-red);
}

.reaction-pill.reacted {
	background: #fee2e2;
	border-color: var(--rc-red);
}

.pinned-badge {
	font-size: 11px;
	background: #fef3c7;
	color: #92400e;
	padding: 1px 6px;
	border-radius: 4px;
	margin-left: 6px;
}

/* Thread Preview Badge */
.thread-preview {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	padding: 3px 8px;
	background: #f1f5f9;
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-sm);
	font-size: 12px;
	font-weight: 600;
	color: var(--rc-text-primary);
	cursor: pointer;
	transition:
		background 0.15s,
		border-color 0.15s;
}

.thread-preview:hover {
	background: #e2e8f0;
	border-color: var(--rc-red);
}

.thread-view-label {
	color: var(--rc-red);
	font-size: 11px;
}

/* Hover Action Toolbar */
.msg-actions {
	position: absolute;
	top: -12px;
	right: 12px;
	display: none;
	align-items: center;
	background: #ffffff;
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-sm);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 2px;
}

.btn-msg-action {
	background: none;
	border: none;
	padding: 4px 6px;
	font-size: 13px;
	cursor: pointer;
	border-radius: 2px;
	color: var(--rc-text-secondary);
}

.btn-msg-action:hover {
	background: var(--rc-hover-bg);
	color: var(--rc-text-primary);
}

.attachment-card {
	margin-top: 8px;
	border-left: 3px solid var(--rc-red);
	background: var(--rc-bubble-bg);
	padding: 8px 12px;
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	max-width: 500px;
}

.attachment-img {
	max-width: 100%;
	max-height: 300px;
	border-radius: var(--radius-sm);
	margin-top: 6px;
}

.typing-indicator {
	font-size: 12px;
	color: var(--rc-text-secondary);
	padding: 4px 24px;
	font-style: italic;
}

/* Composer */
.chat-composer {
	padding: 12px 20px;
	background: #ffffff;
	display: flex;
	align-items: center;
	gap: 10px;
	border-top: 1px solid var(--rc-border);
	position: relative;
}

.emoji-picker-popup {
	position: absolute;
	bottom: 64px;
	left: 50px;
	width: 320px;
	height: 250px;
	background: #ffffff;
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-md);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	padding: 12px;
	overflow-y: auto;
	z-index: 100;
}

.emoji-grid {
	display: grid;
	grid-template-columns: repeat(8, 1fr);
	gap: 6px;
	font-size: 20px;
	text-align: center;
}

.emoji-grid span {
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	transition: background 0.15s;
}

.emoji-grid span:hover {
	background: var(--rc-hover-bg);
}

.chat-composer textarea {
	flex: 1;
	resize: none;
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-md);
	padding: 10px 14px;
	font-size: 14px;
	font-family: inherit;
	outline: none;
	transition: border-color 0.2s;
	max-height: 100px;
}

.chat-composer textarea:focus {
	border-color: var(--rc-red);
}

.btn-send {
	background: var(--rc-red);
	color: #fff;
	border: none;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s;
}

.btn-send:hover {
	background: var(--rc-red-hover);
}

/* Right Side Drawer */
.right-drawer {
	width: 300px;
	border-left: 1px solid var(--rc-border);
	background: #ffffff;
	display: flex;
	flex-direction: column;
}

.drawer-header {
	height: 60px;
	border-bottom: 1px solid var(--rc-border);
	padding: 0 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.drawer-header h3 {
	font-size: 15px;
	font-weight: 700;
}

.drawer-content {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
}

.drawer-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background 0.15s;
}

.drawer-item:hover {
	background: var(--rc-bubble-bg);
}

.canned-card {
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-md);
	padding: 10px 12px;
	margin-bottom: 10px;
	cursor: pointer;
	transition: border-color 0.15s;
}

.canned-card:hover {
	border-color: var(--rc-red);
}

.canned-shortcut {
	font-weight: 700;
	color: var(--rc-red);
	font-size: 13px;
	margin-bottom: 4px;
}

.canned-text {
	font-size: 13px;
	color: var(--rc-text-secondary);
}

.stat-box {
	background: var(--rc-bubble-bg);
	border-radius: var(--radius-md);
	padding: 14px;
	margin-bottom: 12px;
	text-align: center;
}

.stat-value {
	font-size: 24px;
	font-weight: 700;
	color: var(--rc-red);
}

.stat-label {
	font-size: 12px;
	color: var(--rc-text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-top: 4px;
}

/* Sidebar Actions */
.sidebar-header-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* Admin Modal & Tabs */
.admin-modal-card {
	width: 900px;
	max-width: 95vw;
	height: 650px;
	max-height: 90vh;
	padding: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.admin-modal-header {
	height: 60px;
	padding: 0 24px;
	border-bottom: 1px solid var(--rc-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #ffffff;
}

.admin-title-area {
	display: flex;
	align-items: center;
	gap: 12px;
}

.admin-title-area h2 {
	font-size: 17px;
	font-weight: 700;
	margin: 0;
}

.admin-layout {
	display: flex;
	flex: 1;
	overflow: hidden;
}

.admin-nav {
	width: 220px;
	background: #f8fafc;
	border-right: 1px solid var(--rc-border);
	padding: 12px 8px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.admin-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: none;
	background: none;
	border-radius: var(--radius-sm);
	font-size: 13px;
	font-weight: 600;
	color: var(--rc-text-secondary);
	cursor: pointer;
	text-align: left;
	transition: all 0.15s;
}

.admin-nav-item:hover {
	background: #edf2f7;
	color: var(--rc-text-primary);
}

.admin-nav-item.active {
	background: #ffffff;
	color: var(--rc-red);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	font-weight: 700;
}

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

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

/* Settings Form Styles */
.settings-section-card {
	background: #ffffff;
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-md);
	padding: 18px;
	margin-bottom: 20px;
}

.settings-section-card h4 {
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 4px;
	color: var(--rc-text-primary);
}

.settings-section-card p {
	font-size: 13px;
	color: var(--rc-text-secondary);
	margin-bottom: 14px;
}

.setting-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-top: 1px solid #f1f5f9;
}

.setting-info {
	flex: 1;
	padding-right: 20px;
}

.setting-title {
	font-size: 13px;
	font-weight: 600;
	color: var(--rc-text-primary);
}

.setting-desc {
	font-size: 12px;
	color: var(--rc-text-secondary);
	margin-top: 2px;
}

.setting-control input[type="text"] {
	padding: 8px 12px;
	border: 1px solid #dcdfe6;
	border-radius: var(--radius-sm);
	font-size: 13px;
	width: 250px;
}

.setting-control input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
	accent-color: var(--rc-red);
}

/* Licenses Matrix Grid */
.license-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
	margin-top: 14px;
}

.license-pill {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	font-size: 12px;
	font-weight: 600;
	color: #15803d;
}

/* Users Table */
.admin-users-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.admin-users-table th {
	text-align: left;
	padding: 10px 12px;
	background: #f8fafc;
	color: var(--rc-text-secondary);
	font-weight: 600;
	border-bottom: 1px solid var(--rc-border);
}

.admin-users-table td {
	padding: 12px;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
}

.role-tag {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
}

.role-tag.admin {
	background: #fee2e2;
	color: #dc2626;
}

.role-tag.user {
	background: #e0f2fe;
	color: #0369a1;
}

/* Home View Layout */
.home-view-container {
	flex: 1;
	overflow-y: auto;
	padding: 40px 32px;
	background: #ffffff;
}

.home-view-hero {
	text-align: center;
	max-width: 650px;
	margin: 0 auto 36px;
}

.home-view-icon {
	font-size: 48px;
	margin-bottom: 12px;
}

.home-title {
	font-size: 28px;
	font-weight: 800;
	color: var(--rc-text-primary);
	margin-bottom: 8px;
}

.home-subtitle {
	font-size: 15px;
	color: var(--rc-text-secondary);
}

.home-cards-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
	max-width: 960px;
	margin: 0 auto 36px;
}

.home-card {
	background: #ffffff;
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-md);
	padding: 20px;
	cursor: pointer;
	transition: all 0.2s;
}

.home-card:hover {
	border-color: var(--rc-red);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.home-card-icon {
	font-size: 24px;
	font-weight: 700;
	color: var(--rc-red);
	margin-bottom: 10px;
}

.home-card h3 {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 6px;
}

.home-card p {
	font-size: 13px;
	color: var(--rc-text-secondary);
	line-height: 1.45;
}

.home-custom-content {
	max-width: 960px;
	margin: 0 auto;
	padding: 24px;
	background: #f8fafc;
	border-radius: var(--radius-md);
	border: 1px solid var(--rc-border);
	line-height: 1.6;
	font-size: 14px;
}

/* Sidebar Custom Footer */
.sidebar-footer-custom {
	margin-bottom: 8px;
	max-width: 260px;
	text-align: center;
	font-size: 12px;
	color: var(--rc-text-sidebar);
}

/* Code Editor in Admin Layout */
.setting-code-textarea {
	width: 100%;
	min-height: 110px;
	font-family: monospace;
	font-size: 12px;
	padding: 10px;
	border: 1px solid #dcdfe6;
	border-radius: var(--radius-sm);
	background: #1e1e1e;
	color: #d4d4d4;
	line-height: 1.4;
	resize: vertical;
}

.layout-subheading {
	font-size: 13px;
	font-weight: 700;
	color: var(--rc-text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 18px 0 10px;
	padding-bottom: 4px;
	border-bottom: 1px solid #e2e8f0;
}

/* Star / Favorite Button in Room Title */
.btn-star-room {
	background: none;
	border: none;
	font-size: 18px;
	color: #9ca3af;
	cursor: pointer;
	padding: 0 6px;
	line-height: 1;
	transition:
		color 0.15s,
		transform 0.15s;
}

.btn-star-room.favorited {
	color: #eab308;
}

.btn-star-room:hover {
	transform: scale(1.15);
}

/* Quote / Reply Preview Banner */
.quote-preview-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 16px;
	background: #f1f5f9;
	border-left: 3px solid var(--rc-red);
	border-radius: var(--radius-sm);
	margin: 0 16px 8px 16px;
	font-size: 12px;
	color: var(--rc-text-secondary);
}

.quote-content {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
	margin-right: 12px;
}

.quote-content strong {
	color: var(--rc-text-primary);
}

/* Autocomplete Popup (@mentions & /slash commands) */
.autocomplete-popup {
	position: absolute;
	bottom: 60px;
	left: 60px;
	width: 260px;
	max-height: 200px;
	overflow-y: auto;
	background: #ffffff;
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-md);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
	z-index: 100;
	display: flex;
	flex-direction: column;
}

.autocomplete-item {
	padding: 8px 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	transition: background 0.1s;
}

.autocomplete-item:hover,
.autocomplete-item.active {
	background: #f1f5f9;
}

.autocomplete-badge {
	font-weight: 700;
	color: var(--rc-red);
}

/* Embedded Layout (?layout=embedded) */
body.embedded-layout .sidebar {
	display: none !important;
}

body.embedded-layout.hide-header .chat-header {
	display: none !important;
}

body.embedded-layout .chat-main {
	width: 100vw !important;
	height: 100vh !important;
}

/* Read Receipts & Message Details */
.msg-receipts {
	font-size: 11px;
	color: #9ca3af;
	margin-left: 4px;
}

.msg-receipts.read {
	color: #2563eb;
}

/* Discussion Badges & Media Tabs */
.discussion-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #e0f2fe;
	color: #0369a1;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 4px;
}

.discussion-badge:hover {
	background: #bae6fd;
}

.media-filter-tabs {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--rc-border);
}

.media-filter-tab {
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 600;
	background: #f1f5f9;
	border-radius: var(--radius-sm);
	border: none;
	cursor: pointer;
}

.media-filter-tab.active {
	background: var(--rc-red);
	color: #ffffff;
}

/* Enriched Media Attachments (Audio, Video, File Cards) */
.attachment-audio-player {
	margin-top: 8px;
	width: 100%;
	max-width: 380px;
	height: 38px;
	border-radius: var(--radius-sm);
}

.attachment-video-player {
	margin-top: 8px;
	max-width: 480px;
	max-height: 280px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--rc-border);
}

.attachment-file-card {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	margin-top: 6px;
	background: var(--rc-bubble-bg);
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-md);
	text-decoration: none;
	color: var(--rc-text-primary);
	font-size: 13px;
	transition: background 0.15s ease;
}

.attachment-file-card:hover {
	background: var(--rc-hover-bg);
}

.attachment-file-icon {
	font-size: 18px;
}

/* Read Receipts Tooltip / Badges */
.msg-receipts {
	font-size: 12px;
	cursor: pointer;
	margin-left: 6px;
	color: var(--rc-text-secondary);
}

.msg-receipts.seen {
	color: #2563eb;
	font-weight: 700;
}

/* Theme Option Cards in Account Preferences */
.theme-picker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 10px;
	margin: 8px 0 16px;
}

.theme-picker-card {
	border: 2px solid var(--rc-border);
	border-radius: var(--radius-md);
	padding: 12px;
	text-align: center;
	cursor: pointer;
	background: var(--rc-card-bg);
	transition: all 0.15s ease;
}

.theme-picker-card:hover {
	border-color: var(--rc-red);
}

.theme-picker-card.active {
	border-color: var(--rc-red);
	background: #fff5f6;
	color: var(--rc-red);
	font-weight: 700;
}

.theme-preview-box {
	height: 36px;
	border-radius: 4px;
	margin-bottom: 8px;
	border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Voice Recording Overlay */
.voice-recording-overlay {
	flex: 1;
	display: flex;
	align-items: center;
	background: #fee2e2;
	color: #991b1b;
	padding: 6px 14px;
	border-radius: var(--radius-md);
	gap: 12px;
	margin-right: 8px;
	font-size: 13px;
	animation: fadeIn 0.2s ease-in-out;
}

.recording-pulse {
	width: 12px;
	height: 12px;
	background-color: #ef4444;
	border-radius: 50%;
	display: inline-block;
	animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
	0%, 100% { transform: scale(0.9); opacity: 0.8; }
	50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px #ef4444; }
}

.recording-text {
	flex: 1;
}

.recording-actions {
	display: flex;
	gap: 8px;
}

.recording-actions button {
	padding: 4px 10px;
	font-size: 12px;
}

/* OEmbed / OpenGraph Link Previews */
.oembed-card {
	margin-top: 6px;
	border: 1px solid var(--rc-border);
	border-left: 3px solid var(--rc-primary);
	border-radius: 6px;
	background: var(--rc-card-bg);
	padding: 8px 12px;
	max-width: 520px;
	font-size: 13px;
	text-decoration: none;
	display: block;
	color: inherit;
	transition: background 0.15s ease;
}

.oembed-card:hover {
	background: rgba(0, 0, 0, 0.02);
}

.oembed-site {
	font-size: 11px;
	font-weight: 600;
	color: var(--rc-text-secondary);
	text-transform: uppercase;
	margin-bottom: 3px;
}

.oembed-title {
	font-weight: 600;
	color: var(--rc-primary);
	margin-bottom: 4px;
	line-height: 1.3;
}

.oembed-desc {
	font-size: 12px;
	color: var(--rc-text-secondary);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.oembed-img {
	margin-top: 6px;
	max-height: 180px;
	width: 100%;
	object-fit: cover;
	border-radius: 4px;
}

/* Search Results in Right Drawer */
.search-drawer-input {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-sm);
	margin-bottom: 12px;
	font-size: 13px;
	background: var(--rc-input-bg);
	color: var(--rc-text-primary);
}

.search-result-item {
	padding: 10px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--rc-border);
	margin-bottom: 8px;
	cursor: pointer;
	background: var(--rc-card-bg);
	transition: border-color 0.15s;
}

.search-result-item:hover {
	border-color: var(--rc-primary);
}

.search-result-meta {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--rc-text-secondary);
	margin-bottom: 4px;
}

.search-result-text {
	font-size: 13px;
	line-height: 1.4;
}

.search-result-text mark {
	background: #fef08a;
	color: #713f12;
	padding: 1px 3px;
	border-radius: 2px;
	font-weight: 600;
}

.info-msg {
	padding: 8px 12px;
	border-radius: 4px;
	background: #dbeafe;
	color: #1e40af;
	font-size: 12px;
	margin-bottom: 10px;
}

/* --- Floating Date Dividers --- */
.date-divider {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 18px 0 10px 0;
	position: relative;
	width: 100%;
}

.date-divider::before {
	content: "";
	position: absolute;
	left: 16px;
	right: 16px;
	height: 1px;
	background: var(--rc-border);
	z-index: 1;
}

.date-divider span {
	background: var(--rc-card-bg);
	padding: 3px 14px;
	border-radius: 14px;
	font-size: 11px;
	font-weight: 600;
	color: var(--rc-text-secondary);
	border: 1px solid var(--rc-border);
	position: relative;
	z-index: 2;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* --- Sequential Messages & System Event Rows --- */
.message-item.sequential {
	padding-top: 2px;
	padding-bottom: 2px;
	margin-top: 0;
	position: relative;
}

.message-item.sequential .msg-avatar {
	visibility: hidden;
	height: 0;
	min-height: 0;
}

.message-item.sequential .msg-header {
	display: none;
}

.message-item.sequential .msg-time-hover {
	display: none;
	position: absolute;
	left: 12px;
	top: 4px;
	font-size: 10px;
	color: var(--rc-text-secondary);
	width: 32px;
	text-align: right;
}

.message-item.sequential:hover .msg-time-hover {
	display: block;
}

.message-item.system-msg {
	padding: 4px 16px;
	font-size: 12px;
	color: var(--rc-text-secondary);
	display: flex;
	align-items: center;
	gap: 8px;
	font-style: italic;
	background: transparent;
	border-radius: 4px;
}

.message-item.system-msg:hover {
	background: var(--rc-hover-bg);
}

.system-msg-icon {
	font-style: normal;
	font-size: 13px;
	opacity: 0.8;
}

/* --- Spotlight Quick Switcher (Cmd+K) --- */
.spotlight-overlay {
	align-items: flex-start;
	padding-top: 12vh;
	backdrop-filter: blur(4px);
	z-index: 1500;
}

.spotlight-card {
	width: 100%;
	max-width: 580px;
	background: var(--rc-card-bg);
	border-radius: var(--radius-md);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
	border: 1px solid var(--rc-border);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	animation: slideDown 0.15s ease-out;
}

@keyframes slideDown {
	from { transform: translateY(-16px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.spotlight-header {
	display: flex;
	align-items: center;
	padding: 14px 16px;
	border-bottom: 1px solid var(--rc-border);
	gap: 12px;
}

.spotlight-header input {
	flex: 1;
	border: none;
	outline: none;
	font-size: 15px;
	background: transparent;
	color: var(--rc-text-primary);
	font-family: inherit;
}

.spotlight-esc-badge {
	font-size: 10px;
	font-weight: 700;
	background: var(--rc-hover-bg);
	border: 1px solid var(--rc-border);
	border-radius: 4px;
	padding: 3px 6px;
	color: var(--rc-text-secondary);
	cursor: pointer;
}

.spotlight-results {
	max-height: 380px;
	overflow-y: auto;
	padding: 8px;
}

.spotlight-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	font-size: 13px;
	transition: background 0.1s ease;
}

.spotlight-item:hover,
.spotlight-item.active {
	background: var(--rc-hover-bg);
}

.spotlight-item .spotlight-icon {
	font-size: 16px;
	width: 20px;
	text-align: center;
}

.spotlight-item .spotlight-title {
	flex: 1;
	font-weight: 600;
	color: var(--rc-text-primary);
}

.spotlight-item .spotlight-subtitle {
	font-size: 11px;
	color: var(--rc-text-secondary);
}

.search-spotlight-btn {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 4px;
	font-size: 11px;
	padding: 3px 7px;
	color: var(--rc-text-sidebar);
	cursor: pointer;
	font-family: inherit;
	transition: background 0.15s ease;
}

.search-spotlight-btn:hover {
	background: rgba(255, 255, 255, 0.18);
}

/* --- Accordion Section Headers & DM Presence Avatars --- */
.section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	user-select: none;
}

.section-title-left {
	display: flex;
	align-items: center;
	gap: 4px;
}

.section-arrow {
	display: inline-block;
	width: 14px;
	font-size: 10px;
	transition: transform 0.2s ease;
}

.section-arrow.collapsed {
	transform: rotate(-90deg);
}

.dm-item-avatar-wrap {
	position: relative;
	width: 20px;
	height: 20px;
	margin-right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.dm-item-avatar {
	width: 20px;
	height: 20px;
	border-radius: 4px;
	object-fit: cover;
}

.dm-item-status {
	position: absolute;
	bottom: -2px;
	right: -2px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	border: 1.5px solid var(--rc-sidebar-bg);
}

.dm-item-status.online { background: #2de0a5; }
.dm-item-status.away { background: #eab308; }
.dm-item-status.busy { background: #ef4444; }
.dm-item-status.offline { background: #9ca3af; }

/* --- Composer Toolbar --- */
.composer-toolbar {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 4px 10px 0 10px;
	background: var(--rc-card-bg);
	border-top: 1px solid var(--rc-border);
	border-left: 1px solid var(--rc-border);
	border-right: 1px solid var(--rc-border);
	border-top-left-radius: var(--radius-md);
	border-top-right-radius: var(--radius-md);
	width: 100%;
}

.chat-composer {
	flex-wrap: wrap;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.btn-tool {
	background: transparent;
	border: none;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	cursor: pointer;
	color: var(--rc-text-secondary);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.1s, color 0.1s;
}

.btn-tool:hover {
	background: var(--rc-hover-bg);
	color: var(--rc-text-primary);
}

/* --- Drag & Drop Overlay --- */
.drag-drop-overlay {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.92);
	z-index: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(4px);
	pointer-events: none;
}

:root[data-theme="dark"] .drag-drop-overlay {
	background: rgba(26, 29, 33, 0.92);
}

.drag-drop-card {
	border: 2px dashed var(--rc-primary);
	border-radius: 16px;
	padding: 40px 60px;
	text-align: center;
	background: var(--rc-card-bg);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.drag-drop-card h3 {
	margin-top: 12px;
	font-size: 18px;
	color: var(--rc-text-primary);
}

.drag-drop-card p {
	font-size: 13px;
	color: var(--rc-text-secondary);
	margin-top: 4px;
}

/* --- Image Lightbox Modal --- */
.image-lightbox-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.88);
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	backdrop-filter: blur(8px);
	animation: fadeIn 0.15s ease-out;
}

.lightbox-dialog {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.lightbox-dialog img {
	max-width: 100%;
	max-height: 78vh;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	margin-top: 14px;
	color: #ffffff;
	font-size: 13px;
}

.lightbox-close-btn {
	position: absolute;
	top: 20px;
	right: 24px;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #ffffff;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}

.lightbox-close-btn:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* Attachment images cursor pointer for lightbox */
.attachment-img {
	cursor: zoom-in;
}

/* --- Room Info & User Profile Panels --- */
.panel-details-card {
	background: var(--rc-card-bg);
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-sm);
	padding: 16px;
	margin-bottom: 12px;
}

.panel-avatar-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 16px;
}

.panel-avatar-hero img {
	width: 80px;
	height: 80px;
	border-radius: 12px;
	object-fit: cover;
	margin-bottom: 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.panel-field {
	margin-bottom: 12px;
}

.panel-field-label {
	font-size: 11px;
	font-weight: 700;
	color: var(--rc-text-secondary);
	text-transform: uppercase;
	margin-bottom: 4px;
}

.panel-field-value {
	font-size: 13px;
	color: var(--rc-text-primary);
	line-height: 1.4;
	word-break: break-word;
}

/* File category tabs */
.files-tab-bar {
	display: flex;
	border-bottom: 1px solid var(--rc-border);
	margin-bottom: 12px;
	gap: 6px;
	overflow-x: auto;
}

.files-tab-btn {
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 6px 10px;
	font-size: 12px;
	color: var(--rc-text-secondary);
	cursor: pointer;
	white-space: nowrap;
}

.files-tab-btn.active {
	border-bottom-color: var(--rc-primary);
	color: var(--rc-primary);
	font-weight: 600;
}

/* --- Mobile Responsive Layout Breakpoints (@media) --- */
.btn-sidebar-toggle {
	display: none;
	margin-right: 8px;
}

.sidebar-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999;
	backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
	.btn-sidebar-toggle {
		display: inline-flex;
	}

	.sidebar {
		position: fixed;
		left: -280px;
		top: 0;
		bottom: 0;
		width: 280px;
		z-index: 1000;
		transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
		box-shadow: none;
	}

	.sidebar.mobile-open {
		transform: translateX(280px);
		box-shadow: 6px 0 24px rgba(0, 0, 0, 0.35);
	}

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

	.right-drawer {
		position: fixed;
		right: 0;
		top: 0;
		bottom: 0;
		width: 100%;
		max-width: 360px;
		z-index: 1010;
		box-shadow: -6px 0 24px rgba(0, 0, 0, 0.35);
	}

	.chat-main {
		width: 100%;
		min-width: 0;
	}

	.chat-header {
		padding: 10px 14px;
	}

	.chat-composer {
		padding: 8px 12px;
	}

	.composer-toolbar {
		overflow-x: auto;
	}

	.modal-card {
		max-width: 95vw;
		padding: 16px;
	}

	.admin-layout {
		flex-direction: column;
	}

	.admin-nav {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid var(--rc-border);
		flex-direction: row;
		overflow-x: auto;
	}
}

/* --- Video Conference Stream Card --- */
.videoconf-card {
	background: var(--rc-surface);
	border: 1px solid var(--rc-border);
	border-left: 4px solid #10b981;
	border-radius: var(--radius-md);
	padding: 14px 16px;
	margin: 8px 0;
	max-width: 440px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.videoconf-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.videoconf-title {
	font-weight: 700;
	font-size: 14px;
	color: var(--rc-text-primary);
	display: flex;
	align-items: center;
	gap: 6px;
}

.videoconf-status-pill {
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 9999px;
	text-transform: uppercase;
}

.videoconf-status-pill.active {
	background: #ecfdf5;
	color: #059669;
	border: 1px solid #a7f3d0;
}

.videoconf-status-pill.ended {
	background: #f1f5f9;
	color: #64748b;
}

.videoconf-actions {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}

.btn-videoconf {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: var(--radius-sm);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: none;
	transition: all 0.15s ease;
}

.btn-videoconf.primary {
	background: #10b981;
	color: #ffffff;
}

.btn-videoconf.primary:hover {
	background: #059669;
}

.btn-videoconf.danger {
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

.btn-videoconf.danger:hover {
	background: #fee2e2;
}

/* --- Interactive Poll Card --- */
.poll-card {
	background: var(--rc-surface);
	border: 1px solid var(--rc-border);
	border-radius: var(--radius-md);
	padding: 14px 16px;
	margin: 8px 0;
	max-width: 480px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.poll-question {
	font-size: 14px;
	font-weight: 700;
	color: var(--rc-text-primary);
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.poll-option-row {
	margin-bottom: 10px;
	cursor: pointer;
}

.poll-option-btn {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	padding: 6px 10px;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	color: var(--rc-text-primary);
	text-align: left;
}

.poll-option-btn.voted {
	font-weight: 700;
	color: var(--rc-primary);
}

.poll-option-bar {
	height: 8px;
	width: 100%;
	background: var(--rc-hover-bg);
	border-radius: 9999px;
	overflow: hidden;
	margin-top: 2px;
}

.poll-option-fill {
	height: 100%;
	background: var(--rc-primary);
	border-radius: 9999px;
	transition: width 0.3s ease;
}

.poll-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px solid var(--rc-border);
	font-size: 11px;
	color: var(--rc-text-secondary);
}

/* --- Call Modal (Jitsi Meet Container) --- */
.call-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(0, 0, 0, 0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.call-container {
	background: #1e293b;
	border-radius: 12px;
	width: 100%;
	max-width: 1024px;
	height: 85vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.call-header {
	padding: 12px 18px;
	background: #0f172a;
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: #ffffff;
}

.call-title-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
}

.call-badge-live {
	background: #dc2626;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 4px;
	animation: pulse 1.5s infinite;
}

.call-controls {
	display: flex;
	align-items: center;
	gap: 8px;
}

.call-iframe-wrap {
	flex: 1;
	width: 100%;
	height: 100%;
}

.call-iframe-wrap iframe {
	width: 100%;
	height: 100%;
	border: none;
}

/* --- AI Translation Box --- */
.msg-translation-box {
	background: #f8fafc;
	border-left: 3px solid #6366f1;
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	padding: 6px 10px;
	margin-top: 6px;
	font-size: 12px;
	color: var(--rc-text-primary);
}

.translation-tag {
	font-size: 10px;
	font-weight: 700;
	color: #6366f1;
	text-transform: uppercase;
	margin-bottom: 2px;
}

