/* Tutor LMS Community — WhatsApp-style chat in the Tutor visual style (primary #3E64DE). */
.tc-rail, .tc-app, .tc-course-tab, .tc-dashboard, .tc-bell {
	--tc-primary: #3E64DE;
	--tc-primary-dark: #2D4FC4;
	--tc-primary-soft: #EEF2FD;
	--tc-border: #E3E6EB;
	--tc-border-soft: #EEF0F4;
	--tc-text: #1F2433;
	--tc-text-2: #3A4050;
	--tc-muted: #5B616F;
	--tc-bg: #F4F6F9;
	--tc-chat-bg: #F3F5F9;
	--tc-mine: #E3EBFF;
	--tc-ok: #1B7A47;
	--tc-ok-bg: #E6F4EC;
	--tc-warn: #8A3D0B;
	--tc-warn-bg: #FDEBDD;
	--tc-badge: #C2410C;
	--tc-q: #8A5A00;
	--tc-q-bg: #FFF4D6;
	--tc-ai: #4A2FA3;
	--tc-ai-bg: #F7F5FF;
	font-family: inherit;
	color: var(--tc-text);
	box-sizing: border-box;
}
.tc-rail *, .tc-app *, .tc-course-tab *, .tc-dashboard *, .tc-bell * { box-sizing: border-box; }
.tc-hidden { display: none !important; }
[hidden].tc-panel, .tc-rail [hidden], .tc-app [hidden], .tc-bell [hidden], .tc-dashboard [hidden] { display: none !important; }
.tc-muted { color: var(--tc-muted); }
.tc-ico { display: inline-flex; line-height: 0; }
.tc-avatar { border-radius: 50%; object-fit: cover; flex: none; background: #E8EBF1; }
.tc-error { margin: 12px 16px; padding: 10px 12px; border-radius: 8px; background: #FEECEB; color: #B42318; font-size: 13px; }
.tc-empty { padding: 28px 16px; text-align: center; color: var(--tc-muted); font-size: 14px; }
.tc-loading { padding: 28px 16px; text-align: center; color: var(--tc-muted); }

/* ---------- buttons ---------- */
.tc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; padding: 10px 16px; font-size: 14px; font-weight: 600; text-decoration: none !important; cursor: pointer; border: 1px solid transparent; line-height: 1.2; }
.tc-btn-sm { padding: 7px 12px; font-size: 13px; }
.tc-btn-primary { background: var(--tc-primary); color: #fff !important; }
.tc-btn-primary:hover { background: var(--tc-primary-dark); }
.tc-btn-outline { background: #fff; color: var(--tc-primary-dark) !important; border-color: var(--tc-primary); }
.tc-btn-outline:hover { background: var(--tc-primary-soft); }
.tc-btn-block { display: flex; width: 100%; }
.tc-icon-btn { width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--tc-border); border-radius: 8px; background: #fff; color: var(--tc-muted); cursor: pointer; padding: 0; }
.tc-icon-btn:hover { color: var(--tc-primary); border-color: var(--tc-primary); }
.tc-link-btn { background: none; border: 0; padding: 4px 0; color: var(--tc-muted); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tc-link-btn:hover { color: var(--tc-primary); }
.tc-danger:hover { color: #B42318 !important; }
.tc-chip-btn { border: 1px solid var(--tc-border); background: #fff; color: var(--tc-text-2); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.tc-chip-btn.is-active { border-color: var(--tc-primary); background: var(--tc-primary-soft); color: var(--tc-primary-dark); font-weight: 600; }
.tc-btn:focus-visible, .tc-icon-btn:focus-visible, .tc-chip-btn:focus-visible, .tc-link-btn:focus-visible, .tc-space-item:focus-visible, .tc-rail-btn:focus-visible, .tc-act:focus-visible, .tc-send:focus-visible, .tc-attach:focus-visible { outline: 2px solid var(--tc-primary); outline-offset: 2px; }

/* ---------- header / toolbar ---------- */
.tc-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--tc-border); background: #fff; }
.tc-head-main { flex: 1; min-width: 0; }
.tc-head-title { font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-head-sub { font-size: 12px; color: var(--tc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-space-select { margin-top: 2px; max-width: 100%; font-size: 12px; border: 1px solid var(--tc-border); border-radius: 6px; padding: 2px 6px; color: var(--tc-muted); background: #fff; }
.tc-toolbar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--tc-border-soft); background: #fff; flex-wrap: wrap; }
.tc-toolbar .tc-filters { padding: 0; flex: 1; min-width: 0; }
.tc-search-wrap, .tc-list-search { display: flex; align-items: center; gap: 6px; border: 1px solid #D3D8E1; border-radius: 8px; padding: 0 10px; color: var(--tc-muted); background: #fff; }
.tc-search-wrap { width: 220px; max-width: 100%; }
.tc-search-wrap .tc-search, .tc-list-search .tc-search { border: 0; padding: 8px 0; box-shadow: none !important; }
.tc-list-search { margin: 10px 12px; }
.tc-filters { display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto; scrollbar-width: none; background: #fff; }
.tc-filters::-webkit-scrollbar { display: none; }
.tc-search { width: 100%; border: 1px solid #D3D8E1; border-radius: 8px; padding: 8px 12px; font-size: 14px; font-family: inherit; background: #fff; color: var(--tc-text); }
.tc-search:focus, .tc-input:focus, .tc-cta-in:focus { outline: none; border-color: var(--tc-primary); box-shadow: 0 0 0 3px rgba(62, 100, 222, .15); }

/* ---------- pinned bar ---------- */
.tc-pinbar { border-bottom: 1px solid var(--tc-border-soft); background: #FFFBEF; }
.tc-pinbar-btn { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 8px 16px; cursor: pointer; text-align: start; color: var(--tc-text); font-size: 13px; }
.tc-pinbar-btn .tc-ico { color: var(--tc-q); }
.tc-pinbar-label { font-weight: 700; color: var(--tc-q); white-space: nowrap; }
.tc-pinbar-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tc-text-2); }

/* ---------- chat ---------- */
.tc-scroll { flex: 1; min-height: 0; overflow-y: auto; background: var(--tc-chat-bg); overscroll-behavior: contain; }
.tc-msgs { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; }
.tc-day { align-self: center; margin: 8px 0 4px; }
.tc-day span { display: inline-block; background: #fff; border: 1px solid var(--tc-border); border-radius: 8px; padding: 3px 10px; font-size: 11.5px; color: var(--tc-muted); }
.tc-older { align-self: center; border: 1px solid var(--tc-border); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; color: var(--tc-primary-dark); cursor: pointer; margin-bottom: 4px; }

.tc-msg { position: relative; display: flex; align-items: flex-end; gap: 8px; max-width: 100%; }
.tc-msg.is-grouped { margin-top: -3px; }
.tc-msg .tc-avatar { width: 32px; height: 32px; margin-bottom: 2px; }
.tc-avatar-gap { width: 32px; flex: none; }
.tc-msg.is-mine { flex-direction: row-reverse; }
.tc-bubble { position: relative; max-width: min(78%, 640px); min-width: 120px; background: #fff; border: 1px solid #E6E9EF; border-radius: 4px 14px 14px 14px; padding: 8px 12px 6px; box-shadow: 0 1px 1px rgba(20, 30, 60, .04); transition: transform .15s; }
.tc-msg.is-mine .tc-bubble { background: var(--tc-mine); border-color: #D3DEFB; border-radius: 14px 4px 14px 14px; }
.tc-msg.is-grouped .tc-bubble { border-radius: 14px; }
.tc-bubble.is-question { border-color: #F2D488; }
.tc-bubble.is-answer { border-color: #9FD7B6; background: #F1FAF4; }
.tc-b-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.tc-b-name { font-weight: 700; font-size: 13px; color: var(--tc-primary-dark); }
.tc-role { font-size: 10px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; border-radius: 4px; padding: 1px 6px; }
.tc-role-admin { background: #1F2433; color: #fff; }
.tc-role-instructor { background: #E4DEFA; color: var(--tc-ai); }
.tc-role-ai { background: linear-gradient(135deg, #3E64DE, #6C4BE0); color: #fff; }
.tc-typing .tc-bubble { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--tc-muted); font-size: 13px; }
.tc-dots { display: inline-flex; gap: 3px; }
.tc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--tc-primary); opacity: .3; animation: tcDot 1.2s infinite; }
.tc-dots i:nth-child(2) { animation-delay: .2s; }
.tc-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes tcDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.tc-qtag { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--tc-q); background: var(--tc-q-bg); border-radius: 4px; padding: 1px 6px; }
.tc-answer-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--tc-ok); margin-bottom: 2px; }
.tc-b-body { font-size: 14px; line-height: 1.55; color: var(--tc-text); word-wrap: break-word; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.tc-b-body a { color: var(--tc-primary-dark); text-decoration: underline; }
.tc-mention { color: var(--tc-primary-dark); font-weight: 600; background: rgba(62, 100, 222, .08); border-radius: 4px; padding: 0 3px; direction: ltr; unicode-bidi: isolate; }
.tc-mention-ai { color: var(--tc-ai); background: var(--tc-ai-bg); }
.tc-b-meta { display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-size: 11px; color: var(--tc-muted); }
.tc-b-lesson { color: var(--tc-muted) !important; text-decoration: none !important; margin-inline-end: auto; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-b-lesson:hover { color: var(--tc-primary) !important; }
.tc-b-pin { color: var(--tc-q); }
.tc-quote { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: start; border: 0; border-inline-start: 3px solid var(--tc-primary); background: rgba(62, 100, 222, .07); border-radius: 6px; padding: 5px 8px; margin: 2px 0 6px; cursor: pointer; font-size: 12.5px; color: var(--tc-text-2); }
.tc-quote strong { color: var(--tc-primary-dark); font-size: 12px; }
.tc-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-cta { display: flex; align-items: center; justify-content: center; margin: 8px 0 2px; background: var(--tc-primary); color: #fff !important; text-decoration: none !important; font-weight: 700; font-size: 14px; border-radius: 8px; padding: 9px 14px; }
.tc-cta:hover { background: var(--tc-primary-dark); }
.tc-qfoot { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 8px; padding: 7px 10px; border: 1px solid #F2D488; background: #FFFBEF; border-radius: 8px; cursor: pointer; font-size: 12.5px; color: var(--tc-q); font-weight: 600; text-align: start; }
.tc-qfoot.is-solved { border-color: #9FD7B6; background: #F1FAF4; color: var(--tc-ok); }
.tc-qfoot-go { margin-inline-start: auto; color: var(--tc-primary-dark); }

/* message actions (hover on desktop, always visible on touch) */
.tc-acts { display: flex; gap: 2px; align-self: center; opacity: 0; transition: opacity .15s; }
.tc-msg:hover .tc-acts, .tc-msg:focus-within .tc-acts { opacity: 1; }
.tc-act { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #fff; color: var(--tc-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; box-shadow: 0 1px 3px rgba(20, 30, 60, .12); }
.tc-act:hover { color: var(--tc-primary); }
.tc-act.is-on { color: var(--tc-q); }
.tc-act.is-ok { color: var(--tc-ok); }
@media (hover: none) { .tc-acts { opacity: 1; } .tc-acts .tc-act:not(:first-child) { display: none; } .tc-msg:focus-within .tc-acts .tc-act { display: inline-flex; } }

/* attachments */
.tc-atts { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 2px; }
.tc-att-imgs { display: grid; gap: 4px; border-radius: 10px; overflow: hidden; }
.tc-att-imgs.tc-n1 { grid-template-columns: 1fr; }
.tc-att-imgs.tc-n2, .tc-att-imgs.tc-n3, .tc-att-imgs.tc-n4 { grid-template-columns: 1fr 1fr; }
.tc-att-img { display: block; line-height: 0; background: #E8EBF1; }
.tc-att-img img { width: 100%; max-height: 340px; object-fit: cover; display: block; }
.tc-att-imgs.tc-n1 .tc-att-img img { max-height: 420px; object-fit: contain; background: #fff; }
.tc-att-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--tc-border); border-radius: 10px; background: rgba(255, 255, 255, .75); text-decoration: none !important; color: var(--tc-text) !important; font-size: 13px; }
.tc-att-file:hover { border-color: var(--tc-primary); }
.tc-att-ico { width: 36px; height: 36px; border-radius: 8px; background: var(--tc-primary-soft); color: var(--tc-primary); display: flex; align-items: center; justify-content: center; flex: none; }
.tc-att-name { display: flex; flex-direction: column; min-width: 0; }
.tc-att-name > span:first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-att-name .tc-muted { font-size: 11px; }

.tc-edit .tc-input { min-height: 70px; }
.tc-edit-btns { display: flex; gap: 8px; margin-top: 8px; }
@keyframes tcFlash { 0%, 100% { box-shadow: none; } 30% { box-shadow: 0 0 0 3px rgba(240, 180, 41, .65); } }
.tc-flash .tc-bubble { animation: tcFlash 1.6s ease 2; }

/* ---------- composer ---------- */
.tc-composer { position: relative; padding: 10px 12px; border-top: 1px solid var(--tc-border); background: #fff; }
.tc-composer-row { display: flex; gap: 8px; align-items: flex-end; }
.tc-input { flex: 1; width: 100%; min-height: 44px; max-height: 160px; border: 1px solid #D3D8E1; border-radius: 22px; padding: 11px 16px; font-size: 14px; font-family: inherit; line-height: 1.45; resize: none; color: var(--tc-text); background: #fff; overflow-y: auto; unicode-bidi: plaintext; }
.tc-send, .tc-attach { width: 44px; height: 44px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tc-send { border: 0; background: var(--tc-primary); color: #fff; }
.tc-send:hover { background: var(--tc-primary-dark); }
.tc-send:disabled { opacity: .6; cursor: wait; }
.tc-attach { border: 1px solid var(--tc-border); background: #fff; color: var(--tc-muted); }
.tc-attach:hover { color: var(--tc-primary); border-color: var(--tc-primary); }
.tc-composer-tools { display: flex; gap: 6px; margin-bottom: 8px; }
.tc-toggle { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--tc-border); background: #fff; color: var(--tc-muted); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.tc-toggle.is-on { border-color: #F0B429; background: var(--tc-q-bg); color: var(--tc-q); }
.tc-cta-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 6px; margin-bottom: 8px; }
.tc-cta-in { width: 100%; border: 1px solid #D3D8E1; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; }
.tc-replybar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; border-inline-start: 3px solid var(--tc-primary); background: var(--tc-primary-soft); border-radius: 8px; padding: 6px 8px 6px 10px; }
.tc-replybar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; }
.tc-replybar-text strong { color: var(--tc-primary-dark); }
.tc-replybar-text span { color: var(--tc-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-chips:not(:empty) { margin-bottom: 8px; }
.tc-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: var(--tc-bg); border: 1px solid var(--tc-border); border-radius: 999px; padding: 3px 4px 3px 8px; max-width: 240px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tc-chip-x { border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 1; color: var(--tc-muted); padding: 0 4px; }
.tc-composer-msg { font-size: 12px; color: #B42318; }
.tc-composer-msg:not(:empty) { margin-top: 6px; }
.tc-readonly { font-size: 13px; color: var(--tc-warn); background: var(--tc-warn-bg); border-radius: 8px; padding: 10px 12px; }
.tc-mention-menu { position: absolute; left: 12px; right: 12px; bottom: calc(100% - 4px); background: #fff; border: 1px solid var(--tc-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 30, 60, .14); padding: 4px; z-index: 6; max-height: 280px; overflow: auto; }
.tc-mention-title { font-size: 11px; font-weight: 700; color: var(--tc-muted); text-transform: uppercase; padding: 6px 8px 2px; }
.tc-mention-item { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 8px; font-size: 13px; text-align: start; cursor: pointer; color: var(--tc-text); }
.tc-mention-item .tc-avatar { width: 26px; height: 26px; }
.tc-mention-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-avatar-platform { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; background: var(--tc-primary); color: #fff; }
.tc-mention-item.is-active, .tc-mention-item:hover { background: var(--tc-primary-soft); }

/* ---------- welcome guide ---------- */
.tc-guide { position: absolute; z-index: 8; left: 50%; bottom: 84px; transform: translateX(-50%); width: min(440px, calc(100% - 24px)); background: #fff; border: 1px solid #D3DEFB; border-radius: 16px; box-shadow: 0 18px 48px rgba(20, 30, 60, .2); padding: 18px 18px 14px; text-align: right; }
.tc-guide-x { position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border: 0; background: none; font-size: 20px; color: var(--tc-muted); cursor: pointer; border-radius: 50%; }
.tc-guide-step { font-size: 11px; font-weight: 700; color: var(--tc-primary); margin-bottom: 4px; text-align: right; }
.tc-guide-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.tc-guide-body { margin: 0; font-size: 14px; line-height: 1.75; color: var(--tc-text-2); }
.tc-guide-img { width: 100%; border-radius: 10px; margin-top: 10px; }
.tc-guide-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.tc-guide-arrow { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--tc-border); background: #fff; color: var(--tc-primary-dark); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tc-guide-arrow:disabled { opacity: .35; cursor: default; }
.tc-guide-dots { display: flex; gap: 5px; }
.tc-guide-dots span { width: 7px; height: 7px; border-radius: 50%; background: #D3D8E1; }
.tc-guide-dots span.is-on { background: var(--tc-primary); width: 18px; border-radius: 4px; }

/* ---------- locked / renew / join ---------- */
.tc-expired { padding: 24px 14px; overflow: auto; flex: 1; background: var(--tc-chat-bg); }
.tc-expired-card { max-width: 460px; margin: 0 auto; background: #fff; border: 1px solid var(--tc-border); border-radius: 16px; padding: 22px 20px; box-shadow: 0 12px 32px rgba(20, 30, 60, .08); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.tc-lock { width: 56px; height: 56px; border-radius: 16px; background: var(--tc-warn-bg); color: var(--tc-warn); display: flex; align-items: center; justify-content: center; align-self: center; }
.tc-lock-join { background: var(--tc-primary-soft); color: var(--tc-primary); }
.tc-lock svg { width: 26px; height: 26px; }
.tc-expired-title { font-size: 19px; font-weight: 800; }
.tc-expired-card p { margin: 0; font-size: 14px; line-height: 1.55; }
.tc-join-box { border: 1px solid #DCE4FA; background: #F5F8FF; border-radius: 12px; padding: 14px; text-align: start; display: flex; flex-direction: column; gap: 10px; }
.tc-join-title { font-weight: 700; font-size: 14px; }
.tc-plans-box { display: flex; flex-direction: column; gap: 10px; }
.tc-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tc-plan { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; border: 1.5px solid var(--tc-border); background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; text-align: start; }
.tc-plan.is-active { border-color: var(--tc-primary); box-shadow: 0 0 0 3px rgba(62, 100, 222, .12); }
.tc-plan-len { font-size: 13px; color: var(--tc-muted); }
.tc-plan-price { font-size: 16px; font-weight: 800; color: var(--tc-text); }

/* ---------- join / renew (Arabic) ---------- */
.tc-join { max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--tc-border); border-radius: 18px; overflow: hidden; box-shadow: 0 14px 36px rgba(20, 30, 60, .08); text-align: right; }
.tc-join-hero { position: relative; padding: 26px 26px 22px; background: linear-gradient(135deg, #3E64DE 0%, #6C4BE0 100%); color: #fff; }
.tc-join-icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.tc-join-badge { position: absolute; top: 18px; left: 18px; display: inline-flex; align-items: center; gap: 4px; background: rgba(0, 0, 0, .22); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.tc-join-h { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.tc-join-lead { margin: 0; font-size: 15px; line-height: 1.75; opacity: .95; }
.tc-join > .tc-btn { margin: 18px 26px 0; width: auto; }
.tc-join-or { margin: 14px 26px 0; font-weight: 700; color: var(--tc-text-2); }
.tc-join-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; padding: 22px 26px 26px; }
.tc-join-sub { font-weight: 800; font-size: 15px; margin-bottom: 10px; }
.tc-benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tc-benefits li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.65; color: var(--tc-text-2); }
.tc-benefits .tc-ico { color: var(--tc-ok); margin-top: 3px; flex: none; }
.tc-join-buy { display: flex; flex-direction: column; gap: 10px; }
.tc-plans { display: grid; grid-template-columns: 1fr; gap: 8px; }
.tc-plan { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; border: 1.5px solid var(--tc-border); background: #fff; border-radius: 12px; padding: 14px 16px; cursor: pointer; text-align: right; }
.tc-plan.is-active { border-color: var(--tc-primary); box-shadow: 0 0 0 3px rgba(62, 100, 222, .12); background: #F8FAFF; }
.tc-plan-len { font-size: 14px; font-weight: 700; color: var(--tc-text-2); }
.tc-plan-price { font-size: 26px; font-weight: 800; color: var(--tc-text); }
.tc-plan-sub { font-size: 12.5px; color: var(--tc-muted); }
.tc-buy { font-size: 16px; padding: 13px 16px; }
.tc-lock-note { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--tc-muted); }
.tc-space-item.is-general { background: linear-gradient(90deg, #F3F6FF, #fff); border-bottom: 2px solid #DCE4FA; }
.tc-space-item.is-general.is-active { background: var(--tc-primary-soft); }
.tc-space-item.is-general.is-locked .tc-space-title { color: var(--tc-text); }
.tc-space-item.is-general.is-locked .tc-space-thumb { filter: grayscale(.35); }
.tc-pinned-ico { color: var(--tc-q); margin-inline-end: 4px; vertical-align: -1px; }
@media (max-width: 899px) { .tc-join-cols { grid-template-columns: 1fr; } .tc-join-hero { padding: 22px 18px 18px; } .tc-join-cols { padding: 18px; } }

/* ---------- lesson rail ---------- */
.tc-rail { position: fixed; top: 0; right: 0; bottom: 0; z-index: 99990; display: flex; pointer-events: none; }
.tc-rail > * { pointer-events: auto; }
.tc-rail-nav { width: 56px; flex: none; border-left: 1px solid var(--tc-border); background: #fff; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 16px; }
.tc-rail-btn { position: relative; width: 44px; height: 44px; border: 0; border-radius: 10px; background: #F1F3F7; color: var(--tc-text-2); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.tc-rail-btn:hover { color: var(--tc-primary); }
.tc-rail-btn.is-active { background: var(--tc-primary); color: #fff; }
.tc-rail-badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--tc-badge); color: #fff; font-size: 10px; line-height: 16px; font-weight: 600; }
.tc-panel { position: relative; width: 420px; max-width: calc(100vw - 56px); border-left: 1px solid var(--tc-border); background: #fff; display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(20, 30, 60, .06); }
.tc-panel-body { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tc-panel .tc-bubble { max-width: 86%; }
.tc-soon { padding: 24px 20px; color: var(--tc-text-2); font-size: 14px; line-height: 1.6; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.tc-soon p { margin: 0; }
.tc-soon-badge { display: inline-block; font-size: 11px; font-weight: 600; background: #E4DEFA; color: var(--tc-ai); border-radius: 4px; padding: 2px 8px; }
body.tc-has-rail .tutor-course-single-content-wrapper { transition: margin-right .2s, max-width .2s; }

@media (max-width: 767px) {
	.tc-rail { top: auto !important; bottom: 16px; right: 12px; flex-direction: column; align-items: flex-end; }
	.tc-rail-nav { width: auto; flex-direction: column; border: 0; background: transparent; padding: 0; gap: 8px; }
	.tc-rail-btn { width: 48px; height: 48px; border-radius: 50%; box-shadow: 0 6px 18px rgba(20, 30, 60, .2); background: #fff; }
	.tc-rail.is-open { inset: 0; right: 0; bottom: 0; }
	.tc-rail.is-open .tc-rail-nav { position: absolute; right: 12px; top: 10px; flex-direction: row; z-index: 2; }
	.tc-rail.is-open .tc-rail-btn { width: 38px; height: 38px; box-shadow: none; background: #F1F3F7; }
	.tc-rail.is-open .tc-rail-btn.is-active { background: var(--tc-primary); }
	.tc-rail.is-open .tc-panel { width: 100%; max-width: none; height: 100%; }
	.tc-rail.is-open .tc-panel .tc-head { padding-right: 150px; }
}

/* ---------- full app (My Communities) ---------- */
.tc-dashboard { margin-bottom: 24px; }
.tc-dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tc-dash-title { margin: 0; font-size: 20px; font-weight: 700; }
.tc-dash-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tc-notify { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--tc-border); background: #fff; border-radius: 999px; padding: 6px 8px 6px 12px; font-size: 13px; font-weight: 600; color: var(--tc-text-2); cursor: pointer; margin: 0; }
.tc-switch { position: relative; width: 38px; height: 22px; border: 0; border-radius: 11px; background: #CBD1DB; cursor: pointer; padding: 0; transition: background .15s; }
.tc-switch.is-on { background: var(--tc-primary); }
.tc-switch-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.tc-switch.is-on .tc-switch-knob { left: 19px; }
.tc-viewas { position: relative; display: flex; align-items: center; gap: 6px; }
.tc-viewas .tc-search { width: 230px; padding: 7px 10px; }
.tc-viewas-drop { position: absolute; top: calc(100% + 6px); right: 0; width: 320px; background: #fff; border: 1px solid var(--tc-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 30, 60, .14); padding: 4px; z-index: 20; }
.tc-viewas-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 8px 12px; border-radius: 10px; background: var(--tc-warn-bg); color: var(--tc-warn); font-size: 13px; font-weight: 600; }
.tc-viewas-banner > span { display: inline-flex; align-items: center; gap: 6px; }

.tc-shell { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); border: 1px solid var(--tc-border); border-radius: 12px; background: #fff; height: calc(100vh - 120px); max-height: 920px; min-height: 600px; overflow: hidden; }
.tc-pane-list { border-right: 1px solid var(--tc-border); background: #fff; display: flex; flex-direction: column; min-height: 0; }
.tc-pane-list .tc-space-list { flex: 1; overflow-y: auto; }
.tc-pane-main { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--tc-chat-bg); }
.tc-pane-main .tc-back-space { display: none; }
.tc-space-list { display: flex; flex-direction: column; }
.tc-space-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-bottom: 1px solid var(--tc-border-soft); background: #fff; padding: 11px 14px; cursor: pointer; text-align: start; color: var(--tc-text); }
.tc-space-item:hover { background: #F8F9FB; }
.tc-space-item.is-active { background: var(--tc-primary-soft); }
.tc-space-item.is-locked .tc-space-title { color: var(--tc-muted); }
.tc-space-thumb { width: 44px; height: 44px; border-radius: 12px; flex: none; object-fit: cover; }
.tc-space-initials { display: flex; align-items: center; justify-content: center; background: #DCEBFF; color: #1D4A8A; font-weight: 700; font-size: 14px; }
.tc-space-general { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #3E64DE, #6C4BE0); color: #fff; }
.tc-space-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tc-space-title { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-space-last { font-size: 12px; color: var(--tc-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-space-last.is-inactive { color: var(--tc-warn); font-weight: 600; }
.tc-type { margin-left: 6px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; background: #E4DEFA; color: var(--tc-ai); border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.tc-unread { min-width: 22px; height: 22px; border-radius: 11px; background: var(--tc-primary); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.tc-space-lock { color: var(--tc-warn); }
@media (max-width: 899px) {
	.tc-shell { grid-template-columns: 1fr; height: calc(100vh - 140px); min-height: 480px; }
	.tc-shell .tc-pane-main { display: none; }
	.tc-shell.is-open .tc-pane-list { display: none; }
	.tc-shell.is-open .tc-pane-main { display: flex; }
	.tc-pane-main .tc-back-space { display: inline-flex; }
	.tc-pane-list { border-right: 0; }
	.tc-search-wrap { width: 100%; }
	.tc-bubble { max-width: 84%; }
	.tc-viewas .tc-search { width: 180px; }
}

/* ---------- course tab ---------- */
.tc-course-tab { display: flex; flex-direction: column; gap: 16px; }
.tc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tc-stat { background: #fff; border: 1px solid var(--tc-border); border-radius: 10px; padding: 16px; }
.tc-stat-num { font-size: 24px; font-weight: 700; }
.tc-stat-label { font-size: 13px; color: var(--tc-muted); }
.tc-card { background: #fff; border: 1px solid var(--tc-border); border-radius: 10px; }
.tc-card-head { padding: 16px 20px; border-bottom: 1px solid var(--tc-border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tc-card-title { font-weight: 600; font-size: 16px; flex: 1; }
.tc-teaser { padding: 20px; }
.tc-teaser p { margin: 8px 0 14px; }
.tc-row { padding: 16px 20px; border-bottom: 1px solid var(--tc-border-soft); display: flex; gap: 12px; align-items: center; text-decoration: none !important; color: var(--tc-text) !important; }
.tc-row:last-child { border-bottom: 0; }
a.tc-row:hover { background: #F8F9FB; }
.tc-row .tc-avatar { width: 38px; height: 38px; }
.tc-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tc-row-title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-row-meta { font-size: 13px; color: var(--tc-muted); margin-top: 4px; }
.tc-badge { font-size: 12px; border-radius: 4px; padding: 3px 8px; font-weight: 600; white-space: nowrap; }
.tc-badge-ok { color: var(--tc-ok); background: var(--tc-ok-bg); }
.tc-badge-warn { color: var(--tc-warn); background: var(--tc-warn-bg); }
.tc-auto-note { font-size: 13px; color: var(--tc-muted); padding: 0 20px 16px; margin: 0; }
@media (max-width: 600px) { .tc-stats { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- legacy bell shortcode ---------- */
.tc-bell { position: relative; display: inline-flex; }
.tc-bell-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--tc-border); background: #fff; color: var(--tc-text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.tc-bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--tc-badge); color: #fff; font-size: 10px; font-weight: 600; line-height: 18px; padding: 0 5px; text-align: center; }
.tc-bell-drop { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-width: calc(100vw - 24px); max-height: 460px; overflow: auto; background: #fff; border: 1px solid var(--tc-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(20, 30, 60, .14); z-index: 100000; text-align: left; }
.tc-bell-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--tc-border); font-size: 14px; }
.tc-notif { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--tc-border-soft); text-decoration: none !important; color: var(--tc-text) !important; font-size: 13px; line-height: 1.4; }
.tc-notif.is-unread { background: #F5F8FF; }
.tc-notif .tc-avatar { width: 30px; height: 30px; }
.tc-notif-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tc-notif-ex { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-menu-bell { display: flex; align-items: center; }

/* RTL pages */
[dir="rtl"] .tc-msg .tc-bubble { border-radius: 14px 4px 14px 14px; }
[dir="rtl"] .tc-msg.is-mine .tc-bubble { border-radius: 4px 14px 14px 14px; }

[dir="rtl"] .tc-bell-drop { right: auto; left: 0; }

/* Themes such as Elementor kits style every <button> (".elementor-kit-N button" sets padding and radius).
 * Restate padding and radius with a doubled class so they win without touching anything else. */
.tc-btn.tc-btn { border-radius: 8px; padding: 10px 16px; }
.tc-btn-sm.tc-btn-sm { padding: 7px 12px; }
.tc-icon-btn.tc-icon-btn { border-radius: 8px; padding: 0; }
.tc-link-btn.tc-link-btn { padding: 4px 0; }
.tc-chip-btn.tc-chip-btn { border-radius: 999px; padding: 5px 12px; }
.tc-send.tc-send, .tc-attach.tc-attach { border-radius: 50%; padding: 0; }
.tc-chip-x.tc-chip-x { padding: 0 4px; }
.tc-mention-item.tc-mention-item { padding: 7px 8px; border-radius: 8px; }
.tc-rail-btn.tc-rail-btn { border-radius: 10px; padding: 0; }
@media (max-width: 767px) { .tc-rail-btn.tc-rail-btn { border-radius: 50%; } }
.tc-space-item.tc-space-item { padding: 11px 14px; border-radius: 0; }
.tc-bell-btn.tc-bell-btn { border-radius: 50%; padding: 0; }
.tc-act.tc-act { border-radius: 50%; padding: 0; }
.tc-toggle.tc-toggle { border-radius: 999px; padding: 4px 10px; }
.tc-older.tc-older { border-radius: 999px; padding: 6px 14px; }
.tc-quote.tc-quote { border-radius: 6px; padding: 5px 8px; }
.tc-qfoot.tc-qfoot { border-radius: 8px; padding: 7px 10px; }
.tc-pinbar-btn.tc-pinbar-btn { border-radius: 0; padding: 8px 16px; }
.tc-plan.tc-plan { border-radius: 12px; padding: 14px 16px; }
.tc-guide-arrow.tc-guide-arrow { border-radius: 50%; padding: 0; }
.tc-guide-x.tc-guide-x { border-radius: 50%; padding: 0; }
.tc-switch.tc-switch { border-radius: 11px; padding: 0; }

/* ---------- My Communities fills the Tutor dashboard column: no gaps, full height ---------- */
.tutor-frontend-dashboard-maincontent > [class*="tutor-col"]:has(.tc-dashboard) { padding-left: 0; display: flex; flex-direction: column; }
.tutor-dashboard-content:has(.tc-dashboard) { padding-top: 0 !important; margin-bottom: 0 !important; flex: 1; display: flex; flex-direction: column; }
.tc-dashboard { flex: 1; display: flex; flex-direction: column; margin: 0; }
.tc-dashboard .tc-dash-head { margin: 0; padding: 12px 16px; background: #fff; border: 1px solid var(--tc-border); border-left: 0; border-bottom: 0; }
.tc-dashboard .tc-app { flex: 1; display: flex; flex-direction: column; }
.tc-dashboard .tc-shell { flex: 1; height: auto; max-height: none; min-height: 640px; border-radius: 0; border-left: 0; }
.tc-dashboard .tc-pane-main { position: sticky; top: 0; align-self: start; height: 100vh; max-height: 100%; }
.tc-dashboard .tc-shell { align-items: start; }
.tc-dashboard .tc-pane-list { align-self: stretch; }
body.admin-bar .tc-dashboard .tc-pane-main { top: 32px; height: calc(100vh - 32px); }
.tc-dashboard .tc-viewas-banner { margin: 0; border-radius: 0; }
/* The sidebar's own right padding and menu margin: none on this page, so the list touches the menu. */
.tutor-frontend-dashboard-maincontent:has(.tc-dashboard) > .tutor-dashboard-left-menu { padding-right: 0; }
.tutor-frontend-dashboard-maincontent:has(.tc-dashboard) > .tutor-dashboard-left-menu .tutor-dashboard-permalinks { margin-right: 0; }
@media (max-width: 899px) {
	.tutor-frontend-dashboard-maincontent:has(.tc-dashboard) > .tutor-dashboard-left-menu { padding-right: 12px; }
	.tutor-frontend-dashboard-maincontent > [class*="tutor-col"]:has(.tc-dashboard) { padding-left: 12px; }
	.tc-dashboard .tc-dash-head { border-left: 1px solid var(--tc-border); }
	.tc-dashboard .tc-shell { flex: none; height: calc(100vh - 140px); min-height: 480px; border-left: 1px solid var(--tc-border); }
	.tc-dashboard .tc-pane-main, body.admin-bar .tc-dashboard .tc-pane-main { position: relative; top: auto; height: auto; max-height: none; align-self: stretch; }
}

/* ---------- v0.3.1 polish ---------- */
/* header: title, then a members pill next to "How it works" */
.tc-head { padding: 10px 14px; gap: 8px; }
.tc-members { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 999px; background: var(--tc-primary-soft); color: var(--tc-primary-dark); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.tc-head .tc-icon-btn { width: 32px; height: 32px; border-radius: 50%; }
.tc-head-btns { display: flex; gap: 6px; }
/* every message shows the sender's picture and name; small role labels */
.tc-avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; line-height: 0; align-self: flex-start; margin-top: 2px; border-radius: 50%; }
.tc-msg .tc-avatar-btn .tc-avatar { width: 32px; height: 32px; }
button.tc-b-name { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 13px; color: var(--tc-primary-dark); }
button.tc-b-name:hover { text-decoration: underline; }
.tc-role { font-size: 10.5px; font-weight: 800; letter-spacing: 0; text-transform: none; border-radius: 0; padding: 0; background: none !important; }
.tc-role-admin { color: #1F2433; }
.tc-role-instructor { color: var(--tc-ai); }
.tc-role-ai { color: #6C4BE0; }
/* question: a small rounded pill, no side line */
.tc-qtag { border-radius: 999px; padding: 2px 8px; }
.tc-qfoot { width: auto; display: inline-flex; border-radius: 999px; padding: 5px 12px; margin-top: 8px; font-size: 12px; }
.tc-qfoot-go { margin-inline-start: 8px; }
/* pinned bar as a rounded card */
.tc-pinbar { margin: 8px 12px 0; border: 1px solid #F2E2B0; border-radius: 12px; }
.tc-pinbar-btn { border-radius: 12px; }
/* messages sit at the bottom like WhatsApp when there are few */
.tc-scroll { display: flex; flex-direction: column; }
.tc-msgs { margin-top: auto; }
/* welcome guide: arrows together on the right, dots on the left */
.tc-guide-nav { justify-content: space-between; }
.tc-guide-arrows { display: flex; gap: 8px; align-items: center; }
/* platform logo for the general community */
.tc-space-logo { object-fit: contain; background: #fff; border: 1px solid var(--tc-border); padding: 4px; }
/* profile card */
.tc-profile { position: absolute; z-index: 20; width: 220px; background: #fff; border: 1px solid var(--tc-border); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 30, 60, .16); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.tc-scroll { position: relative; }
.tc-profile-name { font-weight: 800; font-size: 14px; }
.tc-profile-role { font-size: 12px; color: var(--tc-muted); margin-bottom: 4px; }

/* ---------- quick access tab + drawer (every page) ---------- */
.tc-launcher { --tc-primary: #3E64DE; --tc-primary-dark: #2D4FC4; --tc-primary-soft: #EEF2FD; --tc-border: #E3E6EB; --tc-border-soft: #EEF0F4; --tc-text: #1F2433; --tc-text-2: #3A4050; --tc-muted: #5B616F; --tc-bg: #F4F6F9; --tc-chat-bg: #F3F5F9; --tc-mine: #E3EBFF; --tc-ok: #1B7A47; --tc-ok-bg: #E6F4EC; --tc-warn: #8A3D0B; --tc-warn-bg: #FDEBDD; --tc-badge: #C2410C; --tc-q: #8A5A00; --tc-q-bg: #FFF4D6; --tc-ai: #4A2FA3; --tc-ai-bg: #F7F5FF; color: var(--tc-text); font-family: inherit; }
.tc-launcher * { box-sizing: border-box; }
.tc-launcher [hidden] { display: none !important; }
.tc-launch-tab { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 99980; display: flex; flex-direction: column; align-items: center; gap: 8px; width: 42px; padding: 14px 0; border: 0; border-radius: 12px 0 0 12px; background: linear-gradient(180deg, #3E64DE, #6C4BE0); color: #fff; cursor: pointer; box-shadow: -4px 6px 18px rgba(20, 30, 60, .22); }
.tc-launch-tab:hover { width: 46px; }
.tc-launch-label { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.tc-launch-badge { min-width: 20px; height: 20px; border-radius: 10px; background: #FF4D6D; color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; padding: 0 5px; text-align: center; }
.tc-launcher.is-open .tc-launch-tab { display: none; }
.tc-drawer-shade { position: fixed; inset: 0; z-index: 99985; background: rgba(15, 23, 42, .25); }
.tc-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 99990; width: 440px; max-width: 100vw; background: #fff; border-left: 1px solid var(--tc-border); box-shadow: -12px 0 32px rgba(20, 30, 60, .16); display: flex; flex-direction: column; }
body.admin-bar .tc-drawer { top: 32px; }
.tc-drawer .tc-panel-body { position: relative; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.tc-drawer .tc-bubble { max-width: 86%; }
.tc-drawer .tc-expired { padding: 14px; }
.tc-drawer .tc-join-cols { grid-template-columns: 1fr; }
@media (max-width: 767px) { .tc-drawer { width: 100vw; } body.admin-bar .tc-drawer { top: 46px; } .tc-launch-tab { top: auto; bottom: 120px; transform: none; } }
.tc-launch-tab.tc-launch-tab { border-radius: 12px 0 0 12px; padding: 14px 0; }
.tc-avatar-btn.tc-avatar-btn, button.tc-b-name.tc-b-name { padding: 0; border-radius: 50%; }
button.tc-b-name.tc-b-name { border-radius: 0; }
.tc-members.tc-members { border-radius: 999px; }

/* v0.3.3: tighter headers, drawer space picker as the title, compact filters */
.tc-head .tc-head-title { line-height: 1.3; margin: 0; }
.tc-head .tc-head-sub { line-height: 1.3; }
.tc-dashboard .tc-pane-main .tc-head { padding: 6px 14px; min-height: 0; }
.tc-dashboard .tc-pane-main .tc-toolbar { padding: 6px 14px; }
.tc-dashboard .tc-pane-main .tc-search { padding-top: 5px; padding-bottom: 5px; }
.tc-head-pick { display: flex; align-items: center; }
.tc-head .tc-space-select.tc-space-select { margin: 0; width: auto; max-width: 100%; font-size: 14.5px; font-weight: 700; color: var(--tc-text); border: 0; background: transparent; padding: 4px 22px 4px 4px; line-height: 1.3; height: auto; min-height: 0; cursor: pointer; box-shadow: none; }
.tc-head .tc-space-select.tc-space-select:hover { background: var(--tc-primary-soft); border-radius: 8px; }
.tc-drawer .tc-head { padding: 8px 12px; }
.tc-drawer .tc-filters { padding: 6px 12px; gap: 4px; border-bottom: 1px solid var(--tc-border-soft); flex-wrap: nowrap; }
.tc-drawer .tc-chip-btn.tc-chip-btn { padding: 3px 10px; font-size: 12px; line-height: 1.4; min-height: 0; }
.tc-dashboard .tc-shell { overflow: clip; } /* hidden made the shell the sticky container and pushed the chat 32px down */

/* v0.3.5: lesson rail = floating pads on the right edge; panels open over the page */
.tc-rail.tc-rail { top: 0; right: 0; bottom: 0; width: 0; overflow: visible; display: block; }
.tc-rail .tc-rail-nav { position: fixed; right: 0; top: 50%; transform: translateY(-50%); width: auto; padding: 0; gap: 8px; border: 0; background: transparent; z-index: 99992; display: flex; flex-direction: column; align-items: flex-end; }
.tc-rail .tc-rail-btn.tc-rail-btn { width: 46px; height: 46px; border-radius: 12px 0 0 12px; background: var(--tc-primary); color: #fff; box-shadow: -4px 4px 16px rgba(20, 30, 60, .22); transition: width .15s ease; }
.tc-rail .tc-rail-btn.tc-rail-btn:hover { width: 54px; color: #fff; }
.tc-rail .tc-rail-btn.tc-rail-btn.is-active { background: #fff; color: var(--tc-primary); width: 54px; }
.tc-rail .tc-rail-badge { top: -4px; left: -4px; right: auto; }
.tc-rail .tc-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; z-index: 99990; box-shadow: -12px 0 32px rgba(20, 30, 60, .16); }
body.admin-bar .tc-rail .tc-panel { top: 32px; }
.tc-rail.is-open .tc-rail-nav { right: 420px; }
.tc-ai-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; background: #F7F8FB; }
.tc-ai-list { display: flex; flex-direction: column; gap: 10px; }
.tc-ai-intro { font-size: 12.5px; color: var(--tc-muted); background: #fff; border: 1px solid var(--tc-border-soft); border-radius: 12px; padding: 8px 12px; text-align: center; }
.tc-ai-row { display: flex; gap: 8px; align-items: flex-end; }
.tc-ai-row.is-mine { justify-content: flex-end; }
.tc-ai-ava { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.tc-ai-bubble { max-width: 85%; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 1.6; padding: 8px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--tc-border-soft); unicode-bidi: plaintext; }
.tc-ai-row.is-mine .tc-ai-bubble { background: var(--tc-primary-soft); border-color: transparent; }
.tc-ai-bubble.is-error { color: #B42318; }
.tc-ai-typing { color: var(--tc-muted); font-style: italic; }
.tc-ai-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--tc-border); background: #fff; }
.tc-ai-input.tc-ai-input, .tc-note-input.tc-note-input { flex: 1; resize: none; border: 1px solid var(--tc-border); border-radius: 18px; padding: 8px 14px; font-size: 14px; line-height: 1.5; min-height: 38px; background: #fff; box-shadow: none; }
.tc-ai-clear { font-size: 12px; white-space: nowrap; }
.tc-note-wrap { flex: 1; min-height: 0; display: flex; padding: 12px; }
.tc-note-input.tc-note-input { border-radius: 12px; height: 100%; min-height: 200px; }
.tc-note-status { font-size: 11.5px; white-space: nowrap; }
@media (max-width: 767px) {
	.tc-rail .tc-rail-nav { top: auto; bottom: 110px; transform: none; }
	.tc-rail.is-open .tc-rail-nav { right: auto; left: 0; top: auto; bottom: 90px; }
	.tc-rail.is-open .tc-rail-btn.tc-rail-btn { border-radius: 0 12px 12px 0; }
	.tc-rail .tc-panel { width: 100vw; }
	body.admin-bar .tc-rail .tc-panel { top: 46px; }
}
@media (max-width: 767px) {
	.tc-rail.is-open .tc-rail-nav { position: fixed; flex-direction: column; transform: none; }
	.tc-rail.is-open .tc-panel .tc-head { padding-right: 14px; }
}
