/* ============================================
   TEAM NOTES SIDEBAR  (FEATURE_TEAMNOTE)
   ============================================ */

:root {
	--teamnote-font-size: 11px;
}

#teamnote-bodywrap {
	margin-left: 40px;
	transition: margin-left 0.25s ease;
}

body.teamnoteopen #teamnote-bodywrap {
	margin-left: 260px;
}

#teamnote-sidebar {
	position: fixed;
	left: 0;
	top: 0;
	height: 100vh;
	width: 40px;
	background: #fcb900;
	z-index: 1500;
	overflow: hidden;
	transition: width 0.25s ease;
	display: flex;
	flex-direction: row;
	box-shadow: 2px 0 8px rgba(0,0,0,0.2);
}

body.teamnoteopen #teamnote-sidebar {
	width: 260px;
}

@media (max-width: 768px) {
	#teamnote-bodywrap {
		margin-left: 40px;
	}
	body.teamnoteopen #teamnote-bodywrap {
		margin-left: 0;
	}
	body.teamnoteopen #teamnote-sidebar {
		width: 90vw;
	}
}

/* ---- Toggle strip ---- */
.teamnote-toggle {
	width: 40px;
	flex-shrink: 0;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 12px;
	gap: 5px;
	color: #1a1a1a;
}

.teamnote-toggle:hover {
	background: rgba(0,0,0,0.08);
}

.teamnote-toggle img {
	width: 22px;
	height: auto;
}

.teamnote-count {
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
}
.teamnote-count.has-alerts {
	background: #d32f2f;
	color: #fff;
	padding: 2px 7px;
	border-radius: 10px;
	font-size: 11px;
	white-space: nowrap;
}

.teamnote-note-bell {
	display: none;
	margin-right: 4px;
	color: #d32f2f;
	font-size: 0.9rem;
}
.teamnote-needs-reply .teamnote-note-bell { display: inline; }
.teamnote-needs-reply { border-left: 3px solid #d32f2f; }

/* Attachment indicator + preview */
.teamnote-attachment {
	margin-top: 6px;
	font-size: 0.82rem;
	color: #555;
}
.teamnote-att-meta { margin-right: 8px; font-family: monospace; font-size: 0.78rem; }
.teamnote-att-preview {
	background: #f3f3f3;
	border: 1px solid #ccc;
	border-radius: 3px;
	padding: 1px 8px;
	font-size: 0.75rem;
	cursor: pointer;
}
.teamnote-att-preview:hover { background: #e6e6e6; }
.teamnote-att-inline img.teamnote-att-img {
	display: block;
	max-width: 100%;
	margin-top: 6px;
	border: 1px solid #ddd;
	border-radius: 3px;
	cursor: zoom-in;
}

.teamnote-attach-btn,
.teamnote-chat-attach-btn {
	background: #f3f3f3;
	border: 1px solid #ccc;
	border-radius: 3px;
	padding: 2px 8px;
	font-size: 0.85rem;
	cursor: pointer;
}
.teamnote-attach-name,
.teamnote-chat-attach-name {
	font-size: 0.75rem;
	color: #666;
	font-style: italic;
	margin-left: 6px;
}

/* Full-size modal overlay */
.teamnote-att-modal {
	position: fixed; top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.85);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-out;
}
.teamnote-att-modal img {
	max-width: 95vw;
	max-height: 95vh;
	box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.teamnote-att-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	background: rgba(255,255,255,0.15);
	color: #fff;
	border: none;
	font-size: 28px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	cursor: pointer;
}
.teamnote-att-modal-close:hover { background: rgba(255,255,255,0.3); }

.teamnote-arrow {
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	transition: transform 0.25s ease;
}

body.teamnoteopen .teamnote-arrow {
	transform: rotate(180deg);
}

body.teamnoteopen .teamnote-toggle {
	display: none;
}

/* ---- Panel ---- */
.teamnote-panel {
	display: none;
	flex: 1;
	flex-direction: column;
	min-width: 0;
	color: #1a1a1a;
}

body.teamnoteopen .teamnote-panel {
	display: flex;
}

/* ---- Panel header ---- */
.teamnote-head {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 8px 8px 4px;
	border-bottom: 1px solid rgba(0,0,0,0.18);
	flex-shrink: 0;
}

.teamnote-head img {
	width: 18px;
	height: auto;
	flex-shrink: 0;
}

.teamnote-head-label {
	flex: 1;
	font-size: 10px;
	font-weight: 800;
	line-height: 1.25;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.teamnote-fontsize-control {
	display: flex;
	align-items: center;
	gap: 3px;
	flex-shrink: 0;
}

.teamnote-fontsize-control label {
	font-size: 13px;
	white-space: nowrap;
}

.teamnote-fontsize-control input {
	width: 40px;
	padding: 1px 3px;
	font-size: 13px;
	border: 1px solid rgba(0,0,0,0.3);
	border-radius: 3px;
	background: rgba(255,255,255,0.6);
	text-align: center;
}

.teamnote-fontsize-control input:focus {
	outline: none;
	border-color: rgba(0,0,0,0.6);
	background: rgba(255,255,255,0.9);
}

.teamnote-x {
	background: none;
	border: none;
	font-size: 18px;
	font-weight: 700;
	color: #1a1a1a;
	cursor: pointer;
	padding: 0 2px;
	line-height: 1;
	opacity: 0.5;
	flex-shrink: 0;
}

.teamnote-x:hover {
	opacity: 1;
}

/* ---- Compose area ---- */
.teamnote-compose {
	padding: 8px;
	border-bottom: 1px solid rgba(0,0,0,0.18);
	flex-shrink: 0;
}

.teamnote-compose textarea {
	width: 100%;
	background: rgba(0,0,0,0.1);
	border: 1px solid rgba(0,0,0,0.2);
	border-radius: 4px;
	padding: 6px 8px;
	font-size: calc(var(--teamnote-font-size) + 1px);
	color: #1a1a1a;
	resize: vertical;
	box-sizing: border-box;
	font-family: inherit;
}

.teamnote-compose textarea::placeholder {
	color: rgba(0,0,0,0.38);
}

.teamnote-compose textarea:focus {
	outline: none;
	border-color: rgba(0,0,0,0.45);
}

.teamnote-urlopt {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 10px;
	margin-top: 5px;
	cursor: pointer;
}

.teamnote-compose button {
	width: 100%;
	margin-top: 6px;
	padding: 7px;
	background: #1a1a1a;
	color: #fcb900;
	border: none;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease;
}

.teamnote-compose button:hover {
	background: #333;
}

/* ---- Filter bar ---- */
.teamnote-filterbar {
	flex-shrink: 0;
	border-bottom: 1px solid rgba(0,0,0,0.18);
}

.teamnote-filter-toggle {
	width: 100%;
	padding: 6px 8px;
	background: rgba(0,0,0,0.06);
	border: none;
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	color: #1a1a1a;
}

.teamnote-filter-toggle:hover {
	background: rgba(0,0,0,0.12);
}

/* ---- Filter dropdown ---- */
.teamnote-filter-dropdown {
	display: none;
	flex-direction: column;
	background: #1a1a1a;
	border-top: 1px solid rgba(255,255,255,0.08);
}

.teamnote-filter-dropdown.open {
	display: flex;
}

.teamnote-filter-dropdown button {
	width: 100%;
	padding: 7px 10px;
	background: none;
	border: none;
	border-bottom: 1px solid rgba(255,255,255,0.06);
	text-align: left;
	font-size: 11px;
	color: #fcb900;
	cursor: pointer;
}

.teamnote-filter-dropdown button:hover {
	background: rgba(255,255,255,0.08);
}

/* ---- Search area inside dropdown ---- */
#teamnote-search-area {
	display: none;
	padding: 6px 8px;
	gap: 4px;
	flex-direction: row;
}

#teamnote-search-area input {
	flex: 1;
	min-width: 0;
	font-size: 11px;
	padding: 4px 6px;
	border: 1px solid rgba(255,255,255,0.2);
	border-radius: 4px;
	background: rgba(255,255,255,0.1);
	color: #fff;
	font-family: inherit;
}

#teamnote-search-area input::placeholder {
	color: rgba(255,255,255,0.35);
}

#teamnote-search-area input:focus {
	outline: none;
	border-color: #fcb900;
}

#teamnote-search-area button {
	border-bottom: none;
	padding: 4px 8px;
	border-radius: 4px;
	font-weight: 700;
	white-space: nowrap;
}

/* ---- Notes list ---- */
.teamnote-list {
	flex: 1;
	overflow-y: auto;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* ---- Individual note ---- */
.teamnote-note {
	background: rgba(0,0,0,0.07);
	border-radius: 4px;
	padding: 8px;
	font-size: var(--teamnote-font-size);
}

.teamnote-note-cleared {
	opacity: 0.6;
	background: rgba(0,0,0,0.04);
}

.teamnote-note-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 3px;
	margin-bottom: 4px;
}

.teamnote-note-name {
	font-weight: 700;
}

.teamnote-note-time {
	font-size: 10px;
	color: rgba(0,0,0,0.5);
}

.teamnote-note-acts {
	margin-left: auto;
	display: flex;
	gap: 3px;
	flex-shrink: 0;
}

.teamnote-note-text {
	line-height: 1.4;
	word-break: break-word;
	margin-bottom: 4px;
}

.teamnote-note-cleared .teamnote-note-text {
	font-style: italic;
}

.teamnote-url {
	display: block;
	width: 100%;
	font-size: 9px;
	color: rgba(0,0,0,0.45);
	font-style: italic;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	margin-top: 1px;
}

/* ---- Cleared badge ---- */
.teamnote-cleared-badge {
	font-size: 9px;
	color: rgba(0,0,0,0.45);
	font-style: italic;
	margin-top: 3px;
}

/* ---- Prevent select-all from grabbing interactive elements ---- */
#teamnote-sidebar button,
#teamnote-sidebar input,
#teamnote-sidebar textarea {
	user-select: none;
}

/* ---- Action buttons (clear / delete) ---- */
.teamnote-actbtn {
	font-size: 9px;
	font-weight: 700;
	padding: 2px 5px;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	line-height: 1.4;
}

.teamnote-clearbtn {
	background: rgba(0,0,0,0.15);
	color: #1a1a1a;
}

.teamnote-clearbtn:hover {
	background: rgba(0,0,0,0.28);
}

.teamnote-deletebtn {
	background: rgba(180,0,0,0.15);
	color: #800;
}

.teamnote-deletebtn:hover {
	background: rgba(180,0,0,0.3);
}

/* ---- Chat replies ---- */
.teamnote-chat {
	background-color: #ffd59e !important;
	border-left: 2px solid rgba(0,0,0,0.18);
	padding: 8px !important;
	margin: 5px 0 0 0 !important;
	margin-left: 0 !important;
	border-radius: 3px;
	display: block;
}

.teamnote-chat-cleared {
	opacity: 0.5;
}

.teamnote-chat-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 3px;
	margin-bottom: 2px;
}

.teamnote-chat-name {
	font-weight: 700;
	font-size: 10px;
}

.teamnote-chat-time {
	font-size: 9px;
	color: rgba(0,0,0,0.45);
}

.teamnote-chat-text {
	font-size: var(--teamnote-font-size);
	line-height: 1.4;
	word-break: break-word;
	background-color: #ffd59e !important;
	padding: 6px !important;
	margin: 4px -8px -8px -8px !important;
}

.teamnote-chat-cleared .teamnote-chat-text {
	font-style: italic;
}

/* ---- Add reply row ---- */
.teamnote-addchat {
	display: flex;
	gap: 4px;
	margin-top: 7px;
}

.teamnote-chat-input {
	flex: 1;
	min-width: 0;
	font-size: var(--teamnote-font-size);
	padding: 4px 6px;
	border: 1px solid rgba(0,0,0,0.2);
	border-radius: 4px;
	background: rgba(255,255,255,0.6);
	font-family: inherit;
}

.teamnote-chat-input:focus {
	outline: none;
	border-color: rgba(0,0,0,0.4);
}

.teamnote-addchat button {
	font-size: 10px;
	font-weight: 700;
	padding: 4px 6px;
	background: #1a1a1a;
	color: #fcb900;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	white-space: nowrap;
}

.teamnote-addchat button:hover {
	background: #333;
}

/* ---- Matraex ticket tie-in ---- */
.teamnote-ticket {
	display: inline-block;
	max-width: 100%;
	font-size: 10px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 10px;
	background: #1976D2;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	vertical-align: middle;
}

.teamnote-ticket-link {
	font-size: 10px;
	margin-left: 4px;
	color: #1976D2;
	cursor: pointer;
}

.teamnote-ticket-assign {
	margin-left: 0;
	font-weight: 700;
	color: #E65100;
}

.teamnote-group-head {
	margin: 10px 0 4px;
	padding: 4px 8px;
	font-size: 11px;
	font-weight: 700;
	background: #1976D2;
	color: #fff;
	border-radius: 4px;
}

.teamnote-group-head.teamnote-group-new { background: #E65100; }

#teamnote-mtx-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100000; }
#teamnote-mtx-modal {
	position: absolute; top: 5vh; left: 50%; transform: translateX(-50%);
	width: 1100px; max-width: 96vw; max-height: 90vh; overflow: auto;
	background: #fff; color: #212121; border-radius: 8px; padding: 16px 20px; font-size: 13px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
#teamnote-mtx-modal h3 { margin: 0 0 8px; }
.teamnote-mtx-sub { color: #666; font-size: 12px; }
.teamnote-mtx-x { position: absolute; top: 8px; right: 14px; font-size: 24px; cursor: pointer; color: #666; }
.teamnote-mtx-note { background: #fff8e1; border: 1px solid #f0d98a; border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; }
.teamnote-mtx-notemeta { font-size: 11px; color: #666; margin-bottom: 3px; }
.teamnote-mtx-notetext { white-space: pre-wrap; word-break: break-word; }
.teamnote-mtx-notelast { margin-top: 4px; font-size: 12px; color: #555; font-style: italic; }
.teamnote-mtx-noteimg { max-width: 100%; max-height: 220px; margin-top: 6px; border: 1px solid #ddd; border-radius: 4px; background: #fff; }
.teamnote-mtx-note { max-height: 38vh; overflow: auto; }
.teamnote-mtx-replies { margin-top: 8px; border-top: 1px solid #f0d98a; padding-top: 6px; }
.teamnote-mtx-repliesbar { font-size: 11px; font-weight: 700; color: #8a6d00; margin-bottom: 4px; }
.teamnote-mtx-reply { margin: 6px 0 0 14px; padding: 6px 8px; background: #ffe9c4; border-left: 3px solid #e0b060; border-radius: 3px; }
.teamnote-mtx-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.teamnote-mtx-tools input { flex: 1; max-width: 420px; padding: 6px 8px; border: 1px solid #bbb; border-radius: 4px; font-size: 13px; }
.teamnote-mtx-table { border-collapse: collapse; width: 100%; }
.teamnote-mtx-table th { text-align: left; background: #f3f3f3; padding: 6px 8px; border: 1px solid #ddd; font-size: 12px; position: sticky; top: -16px; z-index: 1; }
.teamnote-mtx-table td { padding: 8px; border: 1px solid #eee; vertical-align: top; }
.teamnote-mtx-row:hover td { background: #f6f9fd; }
.teamnote-mtx-table tr.teamnote-mtx-current td { background: #e8f1fb; }
.teamnote-mtx-subj { min-width: 280px; }
.teamnote-mtx-id { font-weight: 700; color: #1976D2; }
.teamnote-mtx-title { font-size: 14px; font-weight: 600; min-width: 260px; }
.teamnote-mtx-table td.teamnote-mtx-id { white-space: nowrap; }
.teamnote-mtx-table tr.teamnote-mtx-row { cursor: pointer; }
.teamnote-mtx-table td.teamnote-mtx-pick { white-space: nowrap; width: 1%; }
.teamnote-mtx-table td.teamnote-mtx-num, .teamnote-mtx-table th[data-sort="num"] { text-align: right; width: 44px; }
.teamnote-mtx-table th.teamnote-mtx-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.teamnote-mtx-table th.teamnote-mtx-sortable:hover { background: #e4ecf6; }
.teamnote-mtx-arrow { font-size: 9px; color: #1976D2; }
.teamnote-mtx-tag { font-size: 10px; background: #1976D2; color: #fff; padding: 0 6px; border-radius: 8px; margin-left: 4px; }
.teamnote-mtx-ago { font-size: 11px; color: #777; }
.teamnote-mtx-none { color: #999; font-style: italic; font-size: 11px; }
.teamnote-mtx-recent { font-size: 11px; color: #444; white-space: nowrap; }
.teamnote-mtx-acts { white-space: nowrap; }
.teamnote-mtx-acts button { margin-right: 4px; }
.teamnote-mtx-select { background: #1976D2; color: #fff; border: none; border-radius: 4px; padding: 4px 12px; cursor: pointer; font-weight: 700; }
.teamnote-mtx-histbtn { background: #fff; border: 1px solid #bbb; border-radius: 4px; padding: 3px 8px; cursor: pointer; }
.teamnote-mtx-histrow td { background: #fafafa; }
.teamnote-mtx-hist { margin: 6px 0; padding-left: 8px; border-left: 3px solid #1976D2; }
.teamnote-mtx-histmeta { font-size: 11px; color: #666; }
.teamnote-mtx-histtext { word-break: break-word; }
.teamnote-flash { animation: teamnote-flash 2.5s ease-out; }
@keyframes teamnote-flash { 0% { box-shadow: 0 0 0 3px #1976D2; background: #e8f1fb; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---- New ticket form + developer user setup ---- */
.teamnote-mtx-new { background: #eef6ee; border: 1px solid #b7d9b7; border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; }
.teamnote-mtx-newhead { margin-bottom: 6px; }
.teamnote-mtx-newrow { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.teamnote-mtx-newrow input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid #aaa; border-radius: 4px; font-size: 13px; }
.teamnote-mtx-newrow select { max-width: 260px; padding: 5px; }
.teamnote-mtx-create { background: #2E7D32; color: #fff; border: none; border-radius: 4px; padding: 6px 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.teamnote-mtx-create:disabled { opacity: 0.6; cursor: default; }
.teamnote-mtx-setup { padding: 14px; background: #fff8e1; border: 1px solid #f0d98a; border-radius: 6px; margin: 10px; }
.teamnote-mtx-setup select { margin: 6px 0; padding: 5px; max-width: 100%; }
#teamnote-sidebar.teamnote-needsetup .teamnote-compose,
#teamnote-sidebar.teamnote-needsetup .teamnote-filterbar { display: none; }

/* ---- Big compose / thread window ---- */
.teamnote-open { font-size: 10px; margin-left: 6px; color: #1976D2; text-decoration: none; cursor: pointer; }
#teamnote-big-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99990; }
#teamnote-big {
	position: absolute; top: 5vh; left: 50%; transform: translateX(-50%);
	width: 900px; max-width: 96vw; max-height: 90vh; display: flex; flex-direction: column;
	background: #fff; color: #212121; border-radius: 8px; padding: 16px 20px; font-size: 13px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
#teamnote-big h3 { margin: 0 0 8px; }
#teamnote-big-thread { flex: 1 1 auto; min-height: 60px; max-height: 45vh; overflow: auto; margin-bottom: 10px; padding-right: 4px; }
.teamnote-big-ticket { margin-bottom: 8px; }
.teamnote-big-noticket { color: #E65100; font-weight: 700; }
.teamnote-big-road { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; margin: 8px 0; padding: 8px 10px; background: #eef4fb; border: 1px solid #c9dcf2; border-radius: 6px; }
.teamnote-road-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: #5a6b7d; margin-right: 6px; }
.teamnote-big-road input { padding: 2px 4px; border: 1px solid #aaa; border-radius: 4px; text-align: center; }
.teamnote-big-msg { margin: 8px 0; padding: 8px 10px; background: #f6f8fa; border-radius: 6px; }
.teamnote-big-meta { margin-bottom: 3px; font-size: 11px; }
.teamnote-big-who { color: #fff; font-weight: 700; padding: 0 6px; border-radius: 9px; }
.teamnote-big-when { color: #777; margin-left: 4px; }
.teamnote-big-text { word-break: break-word; }
.teamnote-big-compose textarea { width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid #aaa; border-radius: 4px; font-size: 14px; font-family: inherit; resize: vertical; }
.teamnote-big-opts { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.teamnote-big-spacer { flex: 1; }

.teamnote-needticket { margin: 8px 0 4px; padding: 6px 8px; background: #fff3e0; border: 1px solid #f0c27a; border-radius: 4px; color: #8a4b00; font-size: 12px; }
.teamnote-needticket a { font-weight: 700; color: #E65100; }

/* ---- Full-size window matches the sidebar: yellow frame, darker-yellow note card, peach reply cards ---- */
#teamnote-big .teamnote-ticket-remove { color: #8a1c1c; font-weight: 700; margin-left: 8px; }
/* Other notes on the same MTX ticket: click one to switch to it */
#teamnote-big .teamnote-big-siblings { margin: 6px 0; }
#teamnote-big .teamnote-big-siblabel { font-size: 11px; font-weight: 700; color: rgba(0,0,0,0.6); margin-bottom: 3px; }
/* The other notes are indented under the label (no header row; the current note is not repeated) */
#teamnote-big .teamnote-big-sibtable { width: calc(100% - 22px); margin-left: 22px; border-collapse: collapse; table-layout: fixed; font-size: 12px; background: rgba(255,255,255,0.45); border-left: 3px solid rgba(0,0,0,0.25); border-radius: 0 4px 4px 0; overflow: hidden; }
#teamnote-big .teamnote-big-sibtable td:nth-child(1) { width: 92px; }
#teamnote-big .teamnote-big-sibtable td:nth-child(3) { width: 108px; }
#teamnote-big .teamnote-big-sibtable td:nth-child(4) { width: 84px; }
#teamnote-big .teamnote-big-sibtable td { padding: 4px 8px; border-bottom: 1px solid rgba(0,0,0,0.08); white-space: nowrap; }
#teamnote-big .teamnote-big-sibtext { overflow: hidden; text-overflow: ellipsis; }
#teamnote-big .teamnote-big-sib { cursor: pointer; }
#teamnote-big .teamnote-big-sib:hover td { background: rgba(255,255,255,0.8); }
#teamnote-big .teamnote-big-sib.on td { background: #1a1a1a; color: #fcb900; }
#teamnote-big .teamnote-big-sib.cleared { opacity: 0.55; }
/* Pictures show larger inside the window (not full screen): as wide as the card, capped in height */
#teamnote-big .teamnote-att-inline img { display: block; max-width: 100%; max-height: 60vh; width: auto; height: auto; margin-top: 6px; border: 1px solid rgba(0,0,0,0.25); border-radius: 4px; background: #fff; }
#teamnote-big #teamnote-big-thread { max-height: 56vh; }
#teamnote-big .teamnote-big-clearopt { font-weight: 700; font-size: 12px; cursor: pointer; }
#teamnote-big { background: #fcb900; color: #1a1a1a; border: 1px solid rgba(0,0,0,0.25); }
#teamnote-big h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(0,0,0,0.18); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
#teamnote-big .teamnote-big-logo { width: 20px; height: auto; }
#teamnote-big .teamnote-mtx-x { color: #1a1a1a; opacity: 0.55; }
#teamnote-big .teamnote-mtx-x:hover { opacity: 1; }
#teamnote-big .teamnote-mtx-sub { color: rgba(0,0,0,0.6); }

#teamnote-big .teamnote-big-msg { margin: 8px 0; padding: 10px 12px; border-radius: 4px; background: rgba(0,0,0,0.07); }
#teamnote-big .teamnote-big-first { box-shadow: inset 4px 0 0 #1a1a1a; }
#teamnote-big .teamnote-big-reply { background: #ffd59e; border-left: 3px solid rgba(0,0,0,0.25); margin-left: 22px; }
#teamnote-big .teamnote-big-cleared { opacity: 0.55; }
#teamnote-big .teamnote-big-when { color: rgba(0,0,0,0.5); }
#teamnote-big .teamnote-big-text { font-size: 14px; line-height: 1.45; }

#teamnote-big .teamnote-big-road { background: rgba(255,255,255,0.5); border-color: rgba(0,0,0,0.15); }
#teamnote-big .teamnote-road-label { color: rgba(0,0,0,0.55); }
#teamnote-big .teamnote-big-road a.teamnote-roadmap-link { color: #1565c0; text-decoration: underline; cursor: pointer; }
#teamnote-big .teamnote-road-label a.teamnote-roadmap-link { color: inherit; }

#teamnote-big .teamnote-big-compose textarea { background: rgba(255,255,255,0.85); border-color: rgba(0,0,0,0.3); }
#teamnote-big .teamnote-big-opts button { background: #1a1a1a; color: #fcb900; border: none; border-radius: 4px; padding: 6px 12px; font-weight: 700; cursor: pointer; }
#teamnote-big .teamnote-big-opts button:hover { background: #333; }
#teamnote-big .teamnote-big-opts button:disabled { opacity: 0.5; cursor: default; }

/* ---- Picker: the new-ticket form is opened on purpose ---- */
.teamnote-mtx-newtoggle { background: #fff; border: 1px dashed #2E7D32; color: #2E7D32; border-radius: 4px; padding: 5px 12px; font-weight: 700; cursor: pointer; margin-bottom: 10px; }
.teamnote-mtx-newtoggle:hover, .teamnote-mtx-newtoggle.open { background: #eef6ee; }

/* ---- Toolbar (+ and gear), settings, filter chips, summary ---- */
.teamnote-tool { background: none; border: 1px solid rgba(0,0,0,0.3); border-radius: 4px; width: 24px; height: 24px; font-size: 15px; line-height: 1; cursor: pointer; color: #1a1a1a; padding: 0; flex-shrink: 0; }
.teamnote-tool:hover { background: rgba(0,0,0,0.1); }
.teamnote-tool.on { background: #1a1a1a; color: #fcb900; }
.teamnote-tool-add { font-size: 18px; font-weight: 700; }
.teamnote-settings { padding: 6px 8px; border-bottom: 1px solid rgba(0,0,0,0.18); }

.teamnote-viewtabs.teamnote-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 6px 8px; border: none; border-radius: 0; overflow: visible; }
.teamnote-viewtabs.teamnote-chips button,
.teamnote-chip-select { border: 1px solid rgba(0,0,0,0.25); border-radius: 12px; background: rgba(255,255,255,0.6); padding: 3px 10px; font-size: 11px; font-weight: 700; cursor: pointer; color: #333; }
.teamnote-viewtabs.teamnote-chips button + button { border-left: 1px solid rgba(0,0,0,0.25); }
.teamnote-viewtabs.teamnote-chips button.on,
.teamnote-chip-select.on { background: #1a1a1a; color: #fcb900; }
.teamnote-viewtabs.teamnote-chips button.has-new:not(.on) { color: #E65100; }
.teamnote-chip-select { max-width: 150px; }
.teamnote-more { margin-left: auto; }

.teamnote-summary { padding: 4px 8px 6px; font-size: 10.5px; line-height: 1.5; color: rgba(0,0,0,0.65); border-bottom: 1px solid rgba(0,0,0,0.18); flex-shrink: 0; }
.teamnote-summary:empty { display: none; }
.teamnote-summary a { color: inherit; text-decoration: none; }
.teamnote-summary a:hover { text-decoration: underline; }
.teamnote-summary a.on { background: #1a1a1a; color: #fcb900; border-radius: 8px; padding: 0 5px; }
.teamnote-summary a.has-new:not(.on) { color: #E65100; font-weight: 700; }
/* A person's name keeps their own color; the view in use is marked with a ring instead */
.teamnote-summary a.tn-user { margin-right: 2px; }
.teamnote-summary a.tn-user.on { box-shadow: 0 0 0 2px #1a1a1a; }

/* The row above the summary now holds only a quiet "..." menu (the All / New chips duplicated the summary links) */
.teamnote-viewtabs.teamnote-chips { padding: 6px 8px 2px; justify-content: flex-start; gap: 3px; }
.teamnote-viewtabs.teamnote-chips .teamnote-viewbtn { padding: 2px 8px; font-size: 10.5px; }
.teamnote-viewtabs.teamnote-chips .teamnote-viewbtn:hover:not(.on) { background: rgba(255,255,255,0.9); }

/* Search box sits under the view buttons on the yellow panel (it used to live in the dark drop-down) */
.teamnote-filterbar #teamnote-search-area[style*="block"] { display: flex !important; }
.teamnote-filterbar #teamnote-search-area { padding: 4px 8px 6px; }
.teamnote-filterbar #teamnote-search-area input { background: rgba(255,255,255,0.85); color: #1a1a1a; border: 1px solid rgba(0,0,0,0.3); }
.teamnote-filterbar #teamnote-search-area input::placeholder { color: rgba(0,0,0,0.4); }
.teamnote-filterbar #teamnote-search-area button { background: #1a1a1a; color: #fcb900; border: none; cursor: pointer; }
.teamnote-groupopt { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; cursor: pointer; }
.teamnote-summary-users { margin-top: 1px; }
.teamnote-summary-label { margin-right: 8px; font-weight: 700; }
#teamnote-sidebar.teamnote-needsetup .teamnote-summary,
#teamnote-sidebar.teamnote-needsetup .teamnote-tool-add { display: none; }

/* ---- Active / New toggle and the NEW badge ---- */
.teamnote-viewtabs { display: inline-flex; gap: 0; margin-right: 6px; border: 1px solid rgba(0,0,0,0.25); border-radius: 4px; overflow: hidden; }
.teamnote-viewtabs button { background: rgba(255,255,255,0.6); border: none; padding: 4px 10px; font-size: 11px; font-weight: 700; cursor: pointer; color: #333; }
.teamnote-viewtabs button + button { border-left: 1px solid rgba(0,0,0,0.25); }
.teamnote-viewtabs button.on { background: #1a1a1a; color: #fcb900; }
.teamnote-viewtabs button.has-new:not(.on) { color: #E65100; }
.teamnote-new-badge { display: inline-block; background: #E65100; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 10px; letter-spacing: 0.04em; font-style: normal; }
.teamnote-title-empty .teamnote-title-text { color: #E65100; font-weight: 700; font-style: normal; }

/* ---- Note card: hover highlight, title line, one-line attachment names, disabled reply ---- */
.teamnote-note { transition: background 0.12s, box-shadow 0.12s; cursor: pointer; }
.teamnote-note:hover { background: rgba(25,118,210,0.12); box-shadow: inset 3px 0 0 #1976D2; }
.teamnote-note-cleared:hover { background: rgba(0,0,0,0.08); box-shadow: inset 3px 0 0 #999; }

.teamnote-title { font-weight: 700; font-size: 1.05em; margin: -2px 0 5px; padding-bottom: 4px; border-bottom: 1px solid rgba(0,0,0,0.12); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teamnote-title-id { color: #1976D2; }
.teamnote-title-edit { cursor: pointer; }
.teamnote-title-edit:hover .teamnote-title-text { text-decoration: underline; }
.teamnote-title-empty { font-weight: 400; font-style: italic; color: #b26a00; }
.teamnote-title-empty:hover { text-decoration: underline; }

.teamnote-attachment { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.teamnote-att-meta { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 0; }
.teamnote-att-preview { flex: 0 0 auto; display: inline-flex; align-items: center; padding: 2px 5px; line-height: 0; color: #1976D2; }
.teamnote-att-preview.open { background: #e8f1fb; border-color: #1976D2; }
.teamnote-att-inline { flex: 0 0 100%; }

/* Reply row = launcher for the full-size window; greyed (but still clickable) when a developer must assign a ticket first */
.teamnote-reply-launch { cursor: pointer; align-items: center; }
.teamnote-reply-fake { flex: 1; min-width: 0; padding: 4px 6px; border: 1px solid rgba(0,0,0,0.2); border-radius: 4px; background: rgba(255,255,255,0.6); color: rgba(0,0,0,0.45); font-size: var(--teamnote-font-size); }
.teamnote-reply-btn { font-size: 10px; font-weight: 700; padding: 5px 8px; background: #1a1a1a; color: #fcb900; border-radius: 4px; white-space: nowrap; }
.teamnote-reply-launch:hover .teamnote-reply-fake { border-color: rgba(0,0,0,0.45); }
.teamnote-addchat-blocked { opacity: 0.5; }

.teamnote-big-acts { display: flex; gap: 6px; margin: 6px 0; }
.teamnote-big-chatacts { margin-left: 8px; }

/* ---- Empty state ---- */
.teamnote-empty {
	font-size: 11px;
	color: rgba(0,0,0,0.38);
	font-style: italic;
	text-align: center;
	margin: 12px 0 0;
}
