:root {
    --colex-blue: #0073ea;
    --colex-blue-hover: #0060b9;
    --colex-bg: #ffffff;
    --colex-border: #d0d4e4;
    --colex-border-light: #e6e9ef;
    --colex-text: #323338;
    --colex-text-gray: #676879;
    --colex-hover: #f5f6f8;
    --colex-icon: #b2b2b2;
    --colex-danger: #e2445c;
}

/* ========================================================
   COLEX BOARD STYLES
   ======================================================== */

/* Der Taskmanager ist in index.php eingebettet – body/html werden nicht überschrieben.
   Der interne Scroll wird über .colex-page + .colex-board-wrap gesteuert. */
/* Fix: bei aktivem Tasks-Tab doppelten Scrollbalken unterdrücken */
body:has(#tasks-tab.active) { overflow: hidden !important; }
.colex-page { height: calc(100vh - 64px); display: flex; flex-direction: column; overflow: hidden; padding: 20px 30px 20px 30px; box-sizing: border-box; }

.colex-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-shrink: 0; }
.colex-header-title { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; transition: background 0.15s; }
.colex-header-title:hover { background: var(--colex-hover); }
.colex-header-title h1 { margin: 0; font-size: 24px; font-weight: 600; color: var(--colex-text); }
.colex-header-right { display: flex; gap: 10px; }

.colex-toolbar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; margin-bottom: 10px; flex-wrap: wrap; gap: 15px; flex-shrink: 0; }

.colex-btn-split { display: flex; align-items: stretch; border-radius: 4px; overflow: hidden; }
.colex-btn-blue { background: var(--colex-blue); color: white; border: none; padding: 8px 16px; font-size: 14px; font-weight: 500; cursor: pointer; transition: 0.2s; }
.colex-btn-blue:hover { background: var(--colex-blue-hover); }
.colex-btn-blue-icon { background: var(--colex-blue); color: white; border: none; border-left: 1px solid rgba(255,255,255,0.2); padding: 0 8px; display: flex; align-items: center; cursor: pointer; transition: 0.2s; }
.colex-btn-blue-icon:hover { background: var(--colex-blue-hover); }

/* Kill the native search icon from the password-manager workaround input */
input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-results-button, input[type="search"]::-webkit-search-results-decoration { display: none; }

.colex-search-box { display: flex; align-items: center; border: 1px solid var(--colex-border); border-radius: 4px; padding: 0 10px; transition: 0.2s; width: 200px; background: #fff; }
.colex-search-box:focus-within { border-color: var(--colex-blue); }
.colex-search-box .material-symbols-outlined { color: var(--colex-text-gray); font-size: 18px; }
.colex-search-box input { border: none; outline: none; padding: 8px; font-size: 14px; width: 100%; color: var(--colex-text); }

.colex-tool-btn { background: transparent; border: none; color: var(--colex-text-gray); font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; padding: 8px 12px; border-radius: 4px; transition: 0.2s; }
.colex-tool-btn:hover, .colex-tool-btn.active { background: var(--colex-hover); color: var(--colex-text); }
.colex-tool-btn.active { background: #cce5ff; color: var(--colex-blue); }
.colex-tool-btn .material-symbols-outlined { font-size: 18px; }

.colex-btn-light { background: white; border: 1px solid var(--colex-border); border-radius: 4px; padding: 6px 12px; font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--colex-text-gray); transition: 0.2s; }
.colex-btn-light:hover { background: var(--colex-hover); }
.colex-board-select { border: 1px solid var(--colex-border); border-radius: 4px; padding: 6px 10px; font-size: 14px; outline: none; color: var(--colex-text); }

/* Einziger Tabellen Scrollbalken unten */
.colex-board-wrap { flex: 1; overflow: auto; padding-bottom: 60px; display: flex; flex-direction: column; gap: 30px; }
.colex-board-wrap::-webkit-scrollbar { height: 10px; width: 10px; }
.colex-board-wrap::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 5px; margin: 0 10px; }
.colex-board-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; border: 2px solid #f1f5f9; }
.colex-board-wrap::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.colex-group { width: fit-content; min-width: 100%; }

/* FIX: Perfekt positionierter Header für Gruppen (Align mit Checkbox & Titel) */
.colex-group-header { display: flex; align-items: center; position: sticky; left: 0; z-index: 5; width: max-content; margin-bottom: 10px; }
.colex-group-collapse { width: 40px; background: transparent; border: none; color: var(--colex-blue); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; }
.colex-group-title { font-size: 18px; font-weight: 500; cursor: pointer; outline: none; border: 1px solid transparent; padding: 2px 5px; border-radius: 4px; margin: 0 0 0 5px; }
.colex-group-title:focus { border-color: var(--colex-blue); background: white; }
.colex-group-count { color: var(--colex-text-gray); font-size: 13px; margin-left: 5px; }

/* Mülleimer erscheint nur bei Hover auf der Header-Zeile */
.colex-group-delete-btn { opacity: 0; transition: opacity 0.2s; margin-left: 10px; color: var(--colex-danger) !important; }
.colex-group-header:hover .colex-group-delete-btn { opacity: 1; }

/* Group action buttons (color, up, down) – appear on hover */
.colex-group-action-btn { opacity: 0; transition: opacity 0.2s; margin-left: 2px; color: var(--colex-text-gray); background: transparent; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 5px; padding: 0; flex-shrink: 0; }
.colex-group-action-btn:hover { opacity: 1 !important; background: var(--colex-hover); }
.colex-group-header:hover .colex-group-action-btn { opacity: 1; }
.colex-group-color-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.12); flex-shrink: 0; }
/* Group color palette popup */
.colex-group-palette-color { width: 22px; height: 22px; border-radius: 5px; cursor: pointer; flex-shrink: 0; transition: transform 0.1s, box-shadow 0.1s; border: 1.5px solid rgba(0,0,0,0.08); }
.colex-group-palette-color:hover { transform: scale(1.2); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

.colex-table-wrapper { overflow: visible; }

/* FIX: Magic CSS damit Spalten kleiner werden als ihr Inhalt */
.colex-table { border-collapse: collapse; table-layout: fixed; width: 0; min-width: 100%; }

.colex-table th { background: white; color: var(--colex-text-gray); font-weight: 400; font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--colex-border-light); border-right: 1px solid var(--colex-border-light); text-align: center; position: sticky; top: 0; z-index: 10; user-select: none; }
.colex-table td { border-bottom: 1px solid var(--colex-border-light); border-right: 1px solid var(--colex-border-light); padding: 0; height: 36px; vertical-align: middle; text-align: center; background: white; position: relative; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Sticky Columns */
.colex-table th:nth-child(1), .colex-table td:nth-child(1) { position: sticky; left: 0; z-index: 11; background: white; border-right: none; overflow: visible; }
.colex-table th:nth-child(1) { z-index: 13; }
.colex-table th:nth-child(2), .colex-table td:nth-child(2) { position: sticky; left: 40px; z-index: 11; background: white; text-align: left; border-right: 2px solid var(--colex-border-light); }
.colex-table th:nth-child(2) { z-index: 13; }

.colex-table tr:hover td { background: var(--colex-hover); }
.colex-table tr:hover td:nth-child(1), .colex-table tr:hover td:nth-child(2) { background: var(--colex-hover); }
.colex-table tr.is-dragging { opacity: 0.5; }

.colex-th-inner { display: flex; justify-content: center; align-items: center; width: 100%; position: relative; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.colex-table th:nth-child(2) .colex-th-inner { justify-content: flex-start; }
.colex-th-menu-btn { opacity: 0; cursor: pointer; color: var(--colex-icon); transition: 0.2s; position: absolute; right: 0; padding: 2px; border-radius: 4px; display:flex; align-items:center; justify-content:center;}
.colex-table th:hover .colex-th-menu-btn { opacity: 1; }
.colex-th-menu-btn:hover { background: var(--colex-border-light); color: var(--colex-text); }

.colex-col-add-btn { width: 100%; height: 100%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--colex-icon); transition: 0.2s; }
.colex-col-add-btn:hover { background: var(--colex-hover); color: var(--colex-text); }

.colex-resizer { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 15; transition: background 0.2s; }
.colex-resizer:hover, .colex-resizer.active { background-color: var(--colex-blue); }

.colex-add-item-trigger { padding: 8px 10px; color: var(--colex-text-gray); font-size: 13px; cursor: pointer; transition: 0.2s; display: block; text-align: left; }
.colex-add-item-trigger:hover { background: var(--colex-hover); color: var(--colex-text); }
.colex-add-row { background: #e6f0ff !important; }
.colex-add-row td { background: transparent !important; }
.colex-add-input { width: 100%; padding: 6px 10px; border: 1px solid var(--colex-blue); border-radius: 4px; font-size: 13px; outline: none; color: var(--colex-text); box-sizing:border-box;}

.colex-group-color-indicator { width: 6px; height: calc(100% + 1px); display: block; position: absolute; left: 0; top: 0; z-index: 1; }
.colex-table tbody tr:first-child td .colex-group-color-indicator { border-top-left-radius: 4px; }
.colex-table tbody tr:last-child td .colex-group-color-indicator { border-bottom-left-radius: 4px; height: 100%; }

.colex-checkbox { width: 16px; height: 16px; border: 1px solid var(--colex-border); border-radius: 3px; cursor: pointer; display: flex; align-items: center; justify-content: center; margin: 0 auto; background: white; z-index: 2; position:relative;}

.colex-title-cell { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; height: 100%; width: 100%; box-sizing: border-box; overflow: hidden; }
.colex-title-input { border: none; background: transparent; font-size: 14px; color: var(--colex-text); flex: 1 1 auto; min-width: 0; outline: none; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; text-align: left; }

.colex-title-actions { display: flex; gap: 5px; opacity: 0; transition: 0.2s; align-items: center; flex: 0 0 auto; padding-left: 10px; }
.colex-title-actions.always-visible { opacity: 1; }
.colex-table tr:hover .colex-title-actions { opacity: 1; }
.colex-chat-btn { background: transparent; border: none; cursor: pointer; color: var(--colex-icon); position: relative; display: flex; align-items: center; justify-content: center; }
.colex-chat-btn:hover { color: var(--colex-blue); }
.colex-chat-btn.has-updates { color: var(--colex-blue); }
.colex-chat-badge { position: absolute; top: -5px; right: -5px; background: var(--colex-blue); color: white; font-size: 10px; width: 14px; height: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }

.colex-avatar { width: 28px; height: 28px; border-radius: 50%; background: #e6e9ef; color: #333; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; margin: 0 auto; cursor: pointer; overflow: hidden; border: 1px solid var(--colex-border); }
.colex-avatar img { width: 100%; height: 100%; object-fit: cover; }
.colex-avatar-empty { width: 28px; height: 28px; border-radius: 50%; border: 1px dashed var(--colex-icon); display: flex; align-items: center; justify-content: center; margin: 0 auto; cursor: pointer; color: var(--colex-icon); }

/* Text Ellipsis für Label Zellen */
.colex-label-cell { color: white; width: 100%; height: 100%; display: block; line-height: 35px; text-align: center; font-size: 13px; font-weight: 400; cursor: pointer; position: relative; overflow: hidden; transition: 0.1s; text-overflow: ellipsis; white-space: nowrap; padding: 0 10px; box-sizing: border-box; border-right: 1px solid #fff; border-bottom: 1px solid #fff;}
.colex-label-cell:hover { filter: brightness(0.9); }
.colex-label-cell::before { content: ''; position: absolute; top: 0; right: 0; border-width: 0 10px 10px 0; border-style: solid; border-color: rgba(255,255,255,0.4) #fff transparent transparent; opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.colex-label-cell:hover::before { opacity: 1; }

.colex-date-input { border: none; background: transparent; font-size: 13px; text-align: center; color: var(--colex-text); cursor: pointer; outline: none; width: 100%; }

/* Contact Cell Shrinking */
.colex-contact-pill { display: flex; align-items: center; justify-content: center; background: #e6e9ef; color: var(--colex-text); padding: 4px 8px; border-radius: 4px; font-size: 12px; cursor: pointer; max-width: 100%; margin: 0 auto; box-sizing: border-box; overflow: hidden;}
.colex-contact-pill span.text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 5px; flex: 1; text-align: left; }
.colex-contact-empty { color: var(--colex-icon); cursor: pointer; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

.colex-date-cell { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.colex-date-cell:hover { background: var(--colex-hover); }
.colex-date-cell-empty { color: var(--colex-icon); font-size: 18px; display:flex; align-items:center; }
.colex-date-cell-empty::before { content: '+'; font-size:14px; margin-right:2px; font-family:sans-serif;}
.colex-date-cell-filled { color: var(--colex-text); overflow: hidden; text-overflow: ellipsis; }

/* Pickers & Modals */
.colex-calendar-picker { position: absolute; background: white; border-radius: 8px; box-shadow: 0 4px 17px rgba(0,0,0,0.15); z-index: 10000; border: 1px solid var(--colex-border-light); width: 280px; overflow: hidden; display: none; flex-direction: column; }
.colex-cal-header { padding: 12px; border-bottom: 1px solid var(--colex-border-light); display: flex; justify-content: space-between; align-items: center; background: white;}
.colex-cal-heute-btn { background: transparent; border: 1px solid var(--colex-border); border-radius: 4px; padding: 4px 8px; font-size: 12px; cursor: pointer; color: var(--colex-text); transition: 0.2s; }
.colex-cal-heute-btn:hover { background: var(--colex-hover); }
.colex-cal-time-btn { background: transparent; border: none; cursor: pointer; color: var(--colex-text); display: flex; align-items: center; padding: 4px; border-radius: 4px; }
.colex-cal-time-btn:hover, .colex-cal-time-btn.active { background: var(--colex-blue-light); color: var(--colex-blue); }
.colex-cal-input-row { padding: 10px 12px; display: flex; gap: 8px; border-bottom: 1px solid var(--colex-border-light); background: white;}
.colex-cal-input { flex: 1; border: 1px solid var(--colex-blue); border-radius: 4px; padding: 6px; font-size: 13px; outline: none; color: var(--colex-text); }
.colex-cal-nav { display: flex; justify-content: space-between; padding: 10px 12px; align-items: center; background: white;}
.colex-cal-month-year { font-weight: 600; font-size: 14px; color: var(--colex-text); }
.colex-cal-arrows { display: flex; gap: 4px; }
.colex-cal-arrows button { background: transparent; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 4px; border-radius: 4px; color: var(--colex-text); }
.colex-cal-arrows button:hover { background: var(--colex-hover); }
.colex-cal-grid-header { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--colex-text-gray); margin-bottom: 5px; }
.colex-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; gap: 2px; padding: 0 10px 10px; background: white;}
.colex-cal-day { padding: 6px 0; font-size: 13px; border-radius: 4px; cursor: pointer; color: var(--colex-text); transition: 0.1s; }
.colex-cal-day:hover { background: var(--colex-hover); }
.colex-cal-day.muted { color: #cbd5e1; }
.colex-cal-day.selected { background: var(--colex-blue); color: white; font-weight: bold; }
.colex-cal-day.today { font-weight: bold; color: var(--colex-blue); }
.colex-cal-day.today.selected { color: white; }
.colex-cal-footer { padding: 12px; border-top: 1px solid var(--colex-border-light); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--colex-text-gray); background: #fcfcfc; cursor: pointer; }
.colex-cal-footer:hover { background: var(--colex-hover); }

.colex-dropdown-picker { position: absolute; background: white; border-radius: 8px; box-shadow: 0 4px 17px rgba(0,0,0,0.15); z-index: 9999; border: 1px solid var(--colex-border-light); display: flex; flex-direction: column; overflow: visible; min-width:300px; max-width:700px; }
.colex-picker-search { padding: 10px; border-bottom: 1px solid var(--colex-border-light); display: flex; align-items: center; gap: 8px; }
.colex-picker-search .material-symbols-outlined { color: var(--colex-text-gray); font-size: 18px; }
.colex-picker-search input { width: 100%; border: 1px solid var(--colex-blue); border-radius: 4px; padding: 6px 10px; font-size: 13px; outline: none; box-shadow: 0 0 0 2px rgba(0, 115, 234, 0.2); }
.colex-picker-list { max-height: 250px; overflow-y: auto; padding: 5px 0; }
.colex-picker-item { display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 8px 15px; cursor: pointer; transition: 0.1s; }
.colex-picker-item:hover { background: var(--colex-hover); }
.colex-picker-item-text { font-size: 14px; color: var(--colex-text); }
.colex-picker-item-sub { font-size: 12px; color: var(--colex-text-gray); }

.colex-col-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.colex-col-type-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; padding: 6px; border-radius: 4px; transition: 0.1s;}
.colex-col-type-item:hover { background: var(--colex-hover); }
.col-icon { width: 22px; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; font-size: 12px; flex-shrink: 0;}

.colex-sort-row { display:flex; align-items:center; gap:10px; }
.colex-sort-select { flex:1; border: 1px solid var(--colex-border); border-radius: 4px; padding: 8px; font-size: 13px; outline: none; color: var(--colex-text); }
.colex-sort-select:focus { border-color: var(--colex-blue); }

.colex-label-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 15px; max-height: 350px; overflow-y: auto; min-width: 600px; }
.colex-label-btn { color: white; padding: 8px 10px; font-size: 13px; text-align: center; cursor: pointer; border-radius: 4px; transition: 0.1s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.colex-label-btn:hover { filter: brightness(0.9); }
.colex-picker-footer { border-top: 1px solid var(--colex-border-light); padding: 12px; text-align: center; font-size: 13px; color: var(--colex-text-gray); cursor: pointer; background: #fcfcfc; display: flex; justify-content: center; align-items: center; gap: 5px; }
.colex-picker-footer:hover { background: #f5f6f8; }

.colex-label-editor { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 15px; max-height: 400px; overflow-y: auto; background: white; min-width: 650px; align-items:start; align-content:start;}
.colex-label-edit-box { display: flex; align-items: center; border: 1px solid var(--colex-border); border-radius: 4px; padding: 2px 5px 2px 2px; position: relative; background: white; transition: 0.2s; height:34px; }
.colex-label-edit-box:focus-within { border-color: var(--colex-blue); }
.colex-label-edit-box.inactive { opacity: 0.5; background: #f5f6f8; border-style: dashed; }
.colex-label-edit-box.inactive .colex-label-editor-input { text-decoration: line-through; }
.colex-label-edit-box.drag-over { border-color: var(--colex-blue); border-top-width: 3px; }
.colex-label-edit-box.dragging { opacity: 0.3; }

.colex-drag-handle { cursor: grab; padding: 0 4px; color: var(--colex-icon); opacity: 0; transition: 0.2s; display:flex; align-items:center;}
.colex-label-edit-box:hover .colex-drag-handle { opacity: 1; }

.colex-color-dot { width: 16px; height: 16px; border-radius: 4px; cursor: pointer; flex-shrink: 0; position: relative; margin-right:6px;}
.colex-label-editor-input { flex: 1; border: none; font-size: 13px; outline: none; color: var(--colex-text); background: transparent; width:100%; min-width:0; }
.colex-label-menu-trigger { cursor: pointer; padding: 0 4px; color: var(--colex-text-gray); font-weight:bold; }
.colex-label-menu-trigger:hover { color: var(--colex-text); }

.colex-global-menu { position: fixed; background: white; border: 1px solid var(--colex-border); border-radius: 4px; box-shadow: 0 4px 15px rgba(0,0,0,0.15); z-index: 10000; display: flex; flex-direction: column; width: 180px; padding:5px 0; }
.colex-global-menu-item { padding: 8px 12px; font-size: 13px; cursor: pointer; color: var(--colex-text); display: flex; align-items: center; gap: 8px; transition:0.1s; }
.colex-global-menu-item:hover { background: var(--colex-hover); }
.colex-global-menu-item.danger { color: var(--colex-danger); }
.colex-menu-divider { height: 1px; background: var(--colex-border-light); margin: 5px 0; }

.colex-global-palette { position: fixed; background: white; border: 1px solid var(--colex-border); border-radius: 6px; padding: 10px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; z-index: 10000; box-shadow: 0 4px 20px rgba(0,0,0,0.2); width:240px; }
.colex-palette-color { width: 22px; height: 22px; border-radius: 4px; cursor: pointer; transition: 0.1s; }
.colex-palette-color:hover { transform: scale(1.15); box-shadow: 0 0 5px rgba(0,0,0,0.2); }

.colex-add-label-btn { background: transparent; border: 1px dashed var(--colex-border); border-radius: 4px; height: 34px; font-size: 13px; color: var(--colex-text-gray); cursor: pointer; transition: 0.2s; display:flex; align-items:center; justify-content:center; }
.colex-add-label-btn:hover { border-color: var(--colex-blue); color: var(--colex-blue); background: var(--colex-blue-light); }

.colex-add-group-btn { background: transparent; border: 1px solid var(--colex-border); border-radius: 4px; padding: 8px 15px; font-size: 14px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--colex-text); margin-top: 20px; transition: 0.2s; flex-shrink: 0; }
.colex-add-group-btn:hover { background: var(--colex-hover); }
/* Separator between items and + add trigger row */
.colex-add-trigger-row td { border-bottom: 2px solid var(--colex-border-light) !important; }

/* General icon button (used in table rows, group actions, etc.) */
.colex-icon-btn { background: transparent; border: none; cursor: pointer; color: var(--colex-text-gray); display: flex; align-items: center; justify-content: center; padding: 5px; border-radius: 4px; }
.colex-icon-btn:hover { background: var(--colex-hover); color: var(--colex-text); }

/* ==========================================
   COLEX SIDEBAR – Monday-Style Redesign
   ========================================== */
.colex-sidebar {
    position: fixed; top: 0; right: -760px; width: 740px; height: 100vh;
    background: #fff; z-index: 1100;
    transition: right 0.28s cubic-bezier(.4,0,.2,1), visibility 0s linear 0.28s;
    box-shadow: -6px 0 40px rgba(0,0,0,0.13);
    display: flex; flex-direction: column; visibility: hidden;
    overflow: hidden; /* no horizontal scroll */
}
.colex-sidebar.is-open { right: 0; visibility: visible; transition: right 0.28s cubic-bezier(.4,0,.2,1), visibility 0s linear; }

/* Header */
.csb-header { flex-shrink: 0; background: #fff; border-bottom: 1px solid #e6e9ef; }
.csb-header-top { padding: 0; }
.csb-header-close { display: flex; align-items: center; gap: 4px; padding: 10px 16px 0; }
.csb-icon-btn { background: transparent; border: none; cursor: pointer; color: #676879; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; transition: background 0.15s, color 0.15s; flex-shrink: 0; }
.csb-icon-btn:hover { background: #f5f6f8; color: #323338; }
.csb-icon-btn-more { background: transparent; border: none; cursor: pointer; color: #676879; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; transition: background 0.15s; flex-shrink: 0; }
.csb-icon-btn-more:hover { background: #f5f6f8; color: #323338; }
.csb-header-title-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 12px; }
.csb-title { margin: 0; font-size: 22px; font-weight: 700; color: #323338; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csb-header-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }

/* Tabs */
.csb-tab-bar { display: flex; padding: 0 16px; gap: 0; border-top: 1px solid #e6e9ef; overflow-x: auto; scrollbar-width: none; }
.csb-tab-bar::-webkit-scrollbar { display: none; }
.csb-tab { background: transparent; border: none; border-bottom: 2px solid transparent; padding: 10px 14px; font-size: 13px; font-weight: 500; color: #676879; cursor: pointer; display: flex; align-items: center; gap: 5px; white-space: nowrap; transition: color 0.15s, border-color 0.15s; margin-bottom: -1px; }
.csb-tab:hover { color: #323338; background: #f5f6f8; border-radius: 6px 6px 0 0; }
.csb-tab.is-active { color: var(--colex-blue); border-bottom-color: var(--colex-blue); }
.csb-tab-badge { background: var(--colex-blue); color: white; border-radius: 12px; font-size: 10px; font-weight: 700; padding: 1px 6px; min-width: 18px; text-align: center; }
.csb-tab-badge:empty { display: none; }

/* Tab content panels */
.csb-tab-content { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.csb-tab-content.is-active { display: flex; }

/* Composer */
.csb-composer { flex-shrink: 0; padding: 16px; border-bottom: 1px solid #e6e9ef; background: #fff; }
.csb-composer-inner { display: flex; gap: 10px; align-items: flex-start; }
.csb-composer-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--colex-blue); color: white; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; margin-top: 2px; }
.csb-composer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.csb-composer-box { flex: 1; min-width: 0; border: 1.5px solid #e6e9ef; border-radius: 10px; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; overflow: hidden; }
.csb-composer-box:focus-within { border-color: var(--colex-blue); box-shadow: 0 0 0 3px rgba(0,115,234,0.12); }
.csb-editor { min-height: 64px; max-height: 200px; padding: 12px 14px 8px; font-size: 14px; color: #323338; font-family: 'Inter', sans-serif; line-height: 1.55; outline: none; overflow-y: auto; word-break: break-word; }
.csb-editor:empty::before { content: attr(data-placeholder); color: #c5c7d4; pointer-events: none; }
.csb-editor a { color: var(--colex-blue); text-decoration: underline; }
.csb-editor-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-top: 1px solid #f0f0f0; background: #fafbff; gap: 6px; flex-wrap: nowrap; }
.csb-toolbar-left { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.csb-toolbar-right { flex-shrink: 0; }
.csb-fmt-btn { border: none; background: transparent; cursor: pointer; color: #676879; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: 0.15s; }
.csb-fmt-btn:hover { background: #e8f0fe; color: var(--colex-blue); }
.csb-fmt-btn .material-symbols-outlined { font-size: 17px; }
.csb-fmt-sep { width: 1px; height: 18px; background: #e6e9ef; margin: 0 2px; flex-shrink: 0; }
.csb-btn-post { background: var(--colex-blue); color: white; border: none; border-radius: 6px; padding: 7px 18px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.15s; white-space: nowrap; }
.csb-btn-post:hover { background: #0065cc; }

/* Updates scroll area */
.csb-updates-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px; background: #f5f6f8; display: flex; flex-direction: column; gap: 12px; }

/* Update card */
.csb-update-card { background: #fff; border: 1px solid #e6e9ef; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.04); transition: box-shadow 0.15s; }
.csb-update-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.08); }
.csb-update-body { padding: 14px 16px 8px; }
.csb-update-author-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.csb-update-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--colex-blue); color: white; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.csb-update-avatar img { width: 100%; height: 100%; object-fit: cover; }
.csb-update-author-info { flex: 1; min-width: 0; }
.csb-update-author-name { font-size: 13px; font-weight: 700; color: #323338; }
.csb-update-time { font-size: 11px; color: #c5c7d4; margin-top: 1px; }
.csb-update-card-menu { display: flex; gap: 2px; flex-shrink: 0; opacity: 0; transition: opacity 0.15s; }
.csb-update-card:hover .csb-update-card-menu { opacity: 1; }
.csb-update-text { font-size: 14px; color: #323338; line-height: 1.6; padding: 2px 0 8px; word-break: break-word; }
.csb-update-text a { color: var(--colex-blue); text-decoration: underline; word-break: break-all; }
.csb-update-text p { margin: 0 0 6px 0; }
.csb-update-text p:last-child { margin-bottom: 0; }
.csb-update-text strong, .csb-update-text b { font-weight: 700; }
.csb-update-text em, .csb-update-text i { font-style: italic; }
.csb-update-text ul, .csb-update-text ol { margin: 4px 0 6px 20px; }
.csb-update-text li { margin-bottom: 2px; }
.csb-update-footer { display: flex; align-items: center; gap: 0; border-top: 1px solid #f0f2f5; margin-top: 6px; padding: 2px 6px; }
.csb-reaction-btn { background: transparent; border: none; cursor: pointer; color: #676879; font-size: 12px; display: flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 6px; transition: 0.15s; font-weight: 500; }
.csb-reaction-btn:hover { background: #f5f6f8; color: #323338; }
.csb-reaction-btn .material-symbols-outlined { font-size: 16px; }
.csb-reaction-btn.liked { color: var(--colex-blue); }
.csb-reaction-count { font-size: 12px; font-weight: 600; color: var(--colex-blue); margin-left: 2px; }
.csb-reply-thread { padding: 0 16px 10px; background: #fafbff; border-top: 1px solid #f0f2f5; display: flex; flex-direction: column; gap: 8px; }
.csb-reply-item { display: flex; gap: 8px; align-items: flex-start; padding-top: 8px; }
.csb-reply-avatar { width: 24px; height: 24px; border-radius: 50%; background: #e6e9ef; color: #323338; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; margin-top: 1px; }
.csb-reply-avatar img { width: 100%; height: 100%; object-fit: cover; }
.csb-reply-box { flex: 1; min-width: 0; }
.csb-reply-input-wrap { display: flex; gap: 8px; align-items: flex-start; padding-top: 6px; }
.csb-reply-input { flex: 1; border: 1.5px solid #e6e9ef; border-radius: 8px; padding: 7px 10px; font-size: 13px; color: #323338; outline: none; font-family: 'Inter', sans-serif; background: #fff; transition: border-color 0.2s; }
.csb-reply-input:focus { border-color: var(--colex-blue); }
.csb-reply-send-btn { background: var(--colex-blue); color: white; border: none; border-radius: 6px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; margin-top: 1px; transition: background 0.15s; }
.csb-reply-send-btn:hover { background: #0065cc; }
.csb-reply-send-btn .material-symbols-outlined { font-size: 16px; }
.csb-reply-author { font-size: 12px; font-weight: 700; color: #323338; }
.csb-reply-text { font-size: 13px; color: #323338; line-height: 1.5; }
.csb-reply-meta { font-size: 11px; color: #c5c7d4; margin-top: 1px; }

/* Empty states */
.csb-empty-state { text-align: center; padding: 50px 20px; color: #c5c7d4; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.csb-empty-state p { font-size: 14px; line-height: 1.5; }

/* Activity / Details tabs */
.csb-empty-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #c5c7d4; gap: 12px; text-align: center; padding: 20px; }
.csb-empty-tab p { font-size: 14px; line-height: 1.6; }
.csb-details-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px; }
.csb-detail-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f2f5; }
.csb-detail-label { font-size: 12px; color: #676879; font-weight: 500; width: 120px; flex-shrink: 0; }
.csb-detail-value { font-size: 13px; color: #323338; flex: 1; }

.colex-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); opacity: 0; visibility: hidden; transition: 0.3s ease; z-index: 1090; }
.colex-overlay.is-open { opacity: 1; visibility: visible; display: flex; }

.colex-prompt-input { width: 100%; padding: 8px 12px; border: 1px solid var(--colex-border); border-radius: 4px; font-size: 14px; outline: none; color: var(--colex-text); background: #fff; box-shadow: none; transition: border-color .15s, box-shadow .15s; box-sizing: border-box; }
.colex-prompt-input:focus { border-color: var(--colex-blue); box-shadow: 0 0 0 2px rgba(0, 115, 234, 0.15); }
.colex-dialog { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); z-index: 12001; width: 90%; max-width: 400px; padding: 24px; display: flex; flex-direction: column; }
.colex-dialog h3 { margin: 0 0 10px 0; font-size: 18px; color: var(--colex-text); }
.colex-dialog p { margin: 0 0 20px 0; font-size: 14px; color: var(--colex-text-gray); line-height: 1.5; }
.colex-dialog-footer { display: flex; justify-content: flex-end; gap: 10px; }

.colex-summary-bar { display: flex; height: 22px; border-radius: 4px; overflow: hidden; width: 100%; margin-top:2px; }
.colex-summary-segment { height: 100%; transition: width 0.3s ease; }
.colex-summary-date { background: #333333; color: white; border-radius: 12px; padding: 2px 10px; font-size: 12px; display: inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; overflow: hidden;}
.colex-summary-date.empty { background: #e6e9ef; color: var(--colex-icon); }

/* ---- AUTOMATION CENTER ---- */
.colex-auto-page-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 25px; background: white; border-bottom: 1px solid var(--colex-border-light); flex-shrink: 0; }
.colex-toggle { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; flex-shrink: 0; }
.colex-toggle input { opacity: 0; width: 0; height: 0; }
.colex-toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #d0d4dc; border-radius: 20px; transition: .2s; }
.colex-toggle-slider::before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; border-radius: 50%; transition: .2s; }
.colex-toggle input:checked + .colex-toggle-slider { background-color: var(--colex-blue); }
.colex-toggle input:checked + .colex-toggle-slider::before { transform: translateX(16px); }
.colex-auto-card { background: white; border: 1px solid var(--colex-border-light); border-radius: 8px; padding: 15px 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 15px; transition: box-shadow 0.2s; }
.colex-auto-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* ---- CHECKBOX SELECTED STATE ---- */
.colex-checkbox.is-checked { background: var(--colex-blue); border-color: var(--colex-blue); }
.colex-checkbox.is-checked::after { content: '✓'; color: white; font-size: 11px; line-height: 1; }
.task-row.is-selected td { background: #e8f0fe !important; }
.task-row.is-selected:hover td { background: #d8e6fc !important; }

/* ---- HOVER-ONLY DATE / CONTACT ICONS ---- */
.colex-date-cell-empty { color: var(--colex-icon); font-size: 18px; display: flex; align-items: center; opacity: 0; transition: opacity 0.15s; }
.colex-table tr:hover .colex-date-cell-empty { opacity: 1; }
.colex-date-cell-empty::before { display: none; }
.colex-contact-empty { opacity: 0; transition: opacity 0.15s; }
.colex-table tr:hover .colex-contact-empty { opacity: 1; }

/* ---- CONTEXT MENU ---- */
.colex-context-menu { position: fixed; z-index: 15000; background: white; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.18); border: 1px solid var(--colex-border-light); min-width: 210px; padding: 5px 0; flex-direction: column; }
.colex-cm-item { display: flex; align-items: center; padding: 8px 14px; font-size: 14px; cursor: pointer; color: var(--colex-text); transition: 0.1s; gap: 8px; position: relative; }
.colex-cm-item:hover { background: var(--colex-hover); }
.colex-cm-item .material-symbols-outlined { font-size: 16px; color: var(--colex-text-gray); flex-shrink: 0; }
.colex-cm-danger { color: var(--colex-danger) !important; }
.colex-cm-danger .material-symbols-outlined { color: var(--colex-danger) !important; }
.colex-cm-divider { height: 1px; background: var(--colex-border-light); margin: 4px 0; }
.colex-cm-has-submenu { position: relative; }
.colex-cm-submenu { display: none; position: absolute; left: calc(100% + 2px); top: -5px; min-width: 180px; background: white; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.18); border: 1px solid var(--colex-border-light); padding: 5px 0; z-index: 15001; flex-direction: column; }
.colex-cm-has-submenu:hover .colex-cm-submenu { display: flex; }

/* ---- BULK ACTION BAR ---- */
.colex-bulk-bar { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: #1f1f2e; color: white; border-radius: 10px; padding: 8px 14px; align-items: center; gap: 4px; z-index: 6000; box-shadow: 0 8px 30px rgba(0,0,0,0.35); white-space: nowrap; }
.colex-bulk-count { font-size: 13px; font-weight: 600; padding: 4px 12px 4px 4px; border-right: 1px solid rgba(255,255,255,0.2); margin-right: 4px; }
.colex-bulk-action-btn { background: transparent; border: none; color: rgba(255,255,255,0.85); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 10px; border-radius: 6px; font-size: 11px; transition: 0.15s; }
.colex-bulk-action-btn:hover { background: rgba(255,255,255,0.15); color: white; }
.colex-bulk-action-btn .material-symbols-outlined { font-size: 20px; }
.colex-bulk-close { background: transparent; border: none; color: rgba(255,255,255,0.5); cursor: pointer; font-size: 20px; padding: 4px 6px; margin-left: 6px; display: flex; align-items: center; border-radius: 4px; }
.colex-bulk-close:hover { background: rgba(255,255,255,0.15); color: white; }

/* ---- TOOLBAR ACTIVE STATE ---- */
.colex-tool-btn.active { background: var(--colex-blue-light, #e8f0fe); color: var(--colex-blue); border-color: var(--colex-blue); }

/* ---- FILTER PANEL ---- */
.colex-filter-section { min-width: 160px; flex: 0 0 auto; }
.colex-filter-section-title { font-size: 11px; font-weight: 700; color: var(--colex-text-gray); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.colex-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.colex-filter-chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 20px; font-size: 12px; cursor: pointer; border: 1px solid var(--colex-border-light); background: white; color: var(--colex-text); transition: 0.15s; user-select: none; white-space: nowrap; }
.colex-filter-chip:hover { background: var(--colex-blue-light, #e8f0fe); border-color: var(--colex-blue); color: var(--colex-blue); }
.colex-filter-chip.active { background: var(--colex-blue); border-color: var(--colex-blue); color: white; }

/* ---- HIDE PANEL ---- */
.colex-hide-row { display: flex; align-items: center; gap: 10px; padding: 7px 15px; cursor: pointer; transition: background 0.1s; }
.colex-hide-row:hover { background: var(--colex-blue-light, #e8f0fe); }

/* ---- AVATAR STACK ---- */
.colex-avatar-stack { display: inline-flex; align-items: center; justify-content: center; }
.colex-avatar-stacked { margin-left: -8px !important; border: 2px solid #fff !important; flex-shrink: 0; }
.colex-avatar-stacked:first-child { margin-left: 0 !important; }
.colex-avatar-extra { background: #e6e9ef; color: #676879; font-size: 10px !important; }

/* ---- SIDEBAR HEADER AVATARS ---- */
.csb-header-avatars { display: flex; align-items: center; margin-right: 4px; }
.csb-header-avatars .colex-avatar { width: 28px; height: 28px; font-size: 11px; cursor: default; }
.csb-header-avatars .colex-avatar-stacked { margin-left: -6px !important; border: 2px solid #fff !important; }

/* ---- SIDEBAR FULLSCREEN ---- */
.colex-sidebar.is-fullscreen { width: 100vw !important; right: 0 !important; }
.colex-sidebar.is-fullscreen #csbExpandBtn .material-symbols-outlined { content: 'close_fullscreen'; }

/* ---- SIDEBAR SPACING IMPROVEMENTS ---- */
.csb-header { padding-bottom: 0; }
.csb-header-close { padding: 14px 20px 0; gap: 6px; }
.csb-header-title-row { padding: 8px 20px 14px; }
.csb-title { font-size: 20px; }
.csb-tab-bar { padding: 0 20px; }
.csb-tab { padding: 12px 16px; font-size: 13px; }
.csb-composer { padding: 20px; }
.csb-composer-avatar { width: 36px; height: 36px; }
.csb-updates-scroll { padding: 16px 20px; gap: 14px; }
.csb-update-card { border-radius: 12px; }
.csb-update-body { padding: 16px 18px 10px; }
.csb-update-author-row { margin-bottom: 12px; }
.csb-update-avatar { width: 38px; height: 38px; }
.csb-update-author-name { font-size: 14px; }
.csb-update-time { font-size: 12px; }
.csb-update-text { font-size: 14px; padding: 0 0 10px; }
.csb-update-footer { padding: 4px 10px; }
.csb-reaction-btn { padding: 8px 12px; font-size: 13px; }
.csb-details-body { padding: 20px; }
.csb-detail-row { padding: 12px 0; }

/* ---- SIDEBAR ITEM MENU DROPDOWN ---- */
.csb-item-dropdown { position: absolute; right: 20px; top: 60px; background: white; border: 1px solid var(--colex-border-light); border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); z-index: 5000; min-width: 200px; padding: 4px 0; }
.csb-item-dropdown-item { display: flex; align-items: center; gap: 8px; padding: 9px 14px; cursor: pointer; font-size: 14px; color: var(--colex-text); transition: 0.1s; }
.csb-item-dropdown-item:hover { background: var(--colex-hover); }
.csb-item-dropdown-item .material-symbols-outlined { font-size: 17px; color: var(--colex-text-gray); }
.csb-item-dropdown-item.danger { color: var(--colex-danger); }
.csb-item-dropdown-item.danger .material-symbols-outlined { color: var(--colex-danger); }

/* ---- FILE TAB ---- */
.csb-files-body { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.csb-upload-zone { flex-shrink: 0; margin: 20px 20px 0; border: 2px dashed var(--colex-border); border-radius: 12px; padding: 28px 20px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; background: #fafbff; }
.csb-upload-zone:hover, .csb-upload-zone.is-over { border-color: var(--colex-blue); background: #e8f0fe; }
.csb-upload-link { background: transparent; border: none; color: var(--colex-blue); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }
.csb-upload-link:hover { color: #0060b9; }
.csb-files-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 20px 20px; }
.csb-file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.csb-file-card { border: 1px solid var(--colex-border-light); border-radius: 10px; overflow: hidden; background: white; transition: box-shadow 0.15s; position: relative; }
.csb-file-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.1); }
.csb-file-preview { width: 100%; height: 110px; background: #f5f6f8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.csb-file-preview img { width: 100%; height: 100%; object-fit: cover; }
.csb-file-icon .material-symbols-outlined { font-size: 42px; color: #c5c7d4; }
.csb-file-info { padding: 8px 10px 6px; }
.csb-file-name { font-size: 12px; font-weight: 600; color: var(--colex-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csb-file-meta { font-size: 11px; color: var(--colex-text-gray); margin-top: 2px; }
.csb-file-actions { display: flex; justify-content: flex-end; gap: 2px; padding: 0 6px 6px; }

/* ---- ACTIVITY TAB ---- */
.csb-activity-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 20px; }
.csb-activity-entry { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f2f5; }
.csb-activity-entry:last-child { border-bottom: none; }
.csb-activity-icon { width: 30px; height: 30px; border-radius: 50%; background: #f0f2f5; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.csb-activity-icon .material-symbols-outlined { font-size: 15px; color: var(--colex-text-gray); }
.csb-activity-content { flex: 1; font-size: 13px; color: var(--colex-text); line-height: 1.5; }
.csb-activity-change { font-size: 12px; color: var(--colex-text-gray); }
.csb-activity-time { font-size: 11px; color: #c5c7d4; flex-shrink: 0; white-space: nowrap; }

/* ---- REPLY THREAD (Facebook style) ---- */
.csb-reply-thread { padding: 0 18px 12px 62px; background: #fafbff; border-top: 1px solid #f0f2f5; display: flex; flex-direction: column; gap: 10px; }
.csb-reply-entry { display: flex; gap: 8px; align-items: flex-start; }
.csb-reply-entry-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--colex-blue); color: white; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; margin-top: 1px; }
.csb-reply-entry-avatar img { width: 100%; height: 100%; object-fit: cover; }
.csb-reply-entry-bubble { background: #f0f2f5; border-radius: 12px; padding: 7px 12px; flex: 1; min-width: 0; }
.csb-reply-entry-name { font-size: 12px; font-weight: 700; color: var(--colex-text); margin-bottom: 2px; }
.csb-reply-entry-text { font-size: 13px; color: var(--colex-text); line-height: 1.45; word-break: break-word; }
.csb-reply-entry-time { font-size: 10px; color: #c5c7d4; margin-top: 3px; }

/* ---- SUB-TASKS ---- */
.colex-subtask-toggle { background: transparent; border: none; cursor: pointer; color: var(--colex-text-gray); display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; border-radius: 3px; transition: 0.15s; padding: 0; margin-right: 4px; }
.colex-subtask-toggle:hover { background: var(--colex-hover); color: var(--colex-text); }
.colex-subtask-toggle .material-symbols-outlined { font-size: 18px; transition: transform 0.2s; }
.colex-subtask-toggle.is-open .material-symbols-outlined { transform: rotate(90deg); }
.colex-subtask-count { font-size: 11px; color: var(--colex-blue); background: #e8f0fe; border-radius: 10px; padding: 1px 6px; margin-left: 4px; flex-shrink: 0; font-weight: 600; cursor: pointer; }
.colex-subtask-add-icon { background: transparent; border: none; cursor: pointer; color: var(--colex-icon); display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.15s; }
.colex-table tr:hover .colex-subtask-add-icon { opacity: 1; }
.colex-subtask-add-icon:hover { color: var(--colex-blue); }
.colex-subtasks-container td { background: #f8f9fb !important; padding: 0 !important; border-bottom: 2px solid var(--colex-border-light) !important; }
.colex-subtasks-wrap { padding: 8px 16px 10px 56px; }
.colex-subtasks-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.colex-subtasks-table th { font-size: 12px; font-weight: 500; color: var(--colex-text-gray); padding: 4px 8px; border-bottom: 1px solid var(--colex-border-light); text-align: left; }
.colex-subtasks-table td { border-bottom: 1px solid #f0f2f5; padding: 2px 0; height: 32px; vertical-align: middle; background: transparent !important; }
.colex-subtask-row { transition: background 0.1s; }
.colex-subtask-row:hover td { background: var(--colex-hover) !important; }
.colex-subtask-row:last-child td { border-bottom: none; }
.colex-subtask-toggle-hidden { visibility: hidden; pointer-events: none; }
.colex-table tr:hover .colex-subtask-toggle-hidden { visibility: visible; pointer-events: auto; }
.colex-subtask-add-trigger { background: transparent; border: none; color: var(--colex-text-gray); font-size: 12px; cursor: pointer; padding: 4px 0; display: flex; align-items: center; gap: 4px; transition: 0.15s; }
.colex-subtask-add-trigger:hover { color: var(--colex-blue); }

/* ---- PHONE CALL BUTTON ---- */
.colex-call-btn { background: transparent; border: none; cursor: pointer; color: var(--colex-icon); display: flex; align-items: center; justify-content: center; opacity: 0; transition: 0.15s; padding: 2px; border-radius: 4px; }
.colex-table tr:hover .colex-call-btn { opacity: 1; }
.colex-call-btn:hover { color: #00c875; background: rgba(0,200,117,0.08); }

/* ---- COMMENT SPACING IMPROVEMENTS ---- */
.csb-updates-scroll { padding: 20px 22px !important; }
.csb-update-card { margin-bottom: 20px; }
.csb-update-body { padding: 18px 20px 12px !important; }
.csb-update-author-row { margin-bottom: 14px !important; }
.csb-update-text { font-size: 14px !important; padding: 0 0 12px !important; line-height: 1.65 !important; }
.csb-update-footer { padding: 6px 12px !important; }
.csb-reply-thread { padding: 12px 18px 16px 64px !important; gap: 10px !important; }
.csb-reply-entry { padding-top: 2px; }
.csb-reply-entry-bubble { padding: 8px 14px !important; }
.csb-reply-entry-text { font-size: 13px !important; }

/* ---- INLINE IMAGES IN COMMENTS ---- */
.csb-inline-img { max-width: 220px; max-height: 160px; border-radius: 8px; cursor: zoom-in; display: inline-block; vertical-align: bottom; margin: 4px 2px; border: 1px solid var(--colex-border-light); transition: opacity 0.15s; object-fit: cover; }
.csb-inline-img:hover { opacity: 0.88; }
.csb-update-text .csb-inline-img, .csb-reply-entry-text .csb-inline-img { max-width: 200px; max-height: 140px; }
/* Editor drop-target highlight */
.csb-editor.is-drop-target { border-color: var(--colex-blue) !important; background: #eef4ff !important; }

/* ---- CALL MODAL ---- */
.call-modal-inner { max-width: 380px; width: 94%; display: flex; flex-direction: column; padding: 24px 22px 20px; gap: 0; }
.call-modal-head { display: flex; align-items: center; gap: 12px; }
.call-modal-icon-wrap { width: 40px; height: 40px; background: #e6f9f0; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.call-modal-title { font-size: 16px; font-weight: 700; color: var(--colex-text); line-height: 1.2; }
.call-modal-subtitle { font-size: 12px; color: var(--colex-text-gray); margin-top: 2px; }
.call-modal-close-btn { margin-left: auto; background: transparent; border: none; cursor: pointer; color: var(--colex-text-gray); display: flex; align-items: center; padding: 6px; border-radius: 6px; transition: background 0.15s; }
.call-modal-close-btn:hover { background: var(--colex-hover); }
.call-modal-sep { height: 1px; background: var(--colex-border-light); margin: 16px 0; }
.call-modal-fields { display: flex; flex-direction: column; gap: 0; }
.call-field-label { font-size: 11.5px; font-weight: 600; color: var(--colex-text-gray); text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 5px 0; display: block; }
.call-field-label ~ .call-field-label, .call-text-input ~ .call-field-label, .call-notes-area ~ .call-field-label { margin-top: 14px; }
.call-text-input { margin-bottom: 0 !important; }
.call-notes-area { width: 100%; min-height: 90px; padding: 10px 12px; border: 1.5px solid var(--colex-border); border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; box-sizing: border-box; outline: none; transition: border-color 0.2s; color: var(--colex-text); background: var(--colex-bg); }
.call-notes-area:focus { border-color: var(--colex-blue); }

/* ---- ADDRESS AUTOCOMPLETE ---- */
.call-addr-wrap { position: relative; }
.call-addr-pin-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--colex-text-gray); pointer-events: none; }
.call-addr-dropdown { position: fixed; background: var(--colex-card, #fff); border: 1px solid var(--colex-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.13); z-index: 14000; display: none; max-height: 220px; overflow-y: auto; }
.call-addr-opt { padding: 9px 14px; font-size: 12.5px; color: var(--colex-text); cursor: pointer; line-height: 1.4; }
.call-addr-opt:hover { background: var(--colex-hover); }
.call-addr-opt + .call-addr-opt { border-top: 1px solid var(--colex-border-light); }

/* ---- MAP PREVIEW ---- */
.call-map-preview { margin-top: 8px; border-radius: 8px; overflow: hidden; border: 1px solid var(--colex-border); }
.call-map-iframe { width: 100%; height: 175px; border: none; display: block; }
.call-map-ext-link { display: flex; align-items: center; gap: 4px; padding: 6px 12px; font-size: 12px; color: var(--colex-blue); text-decoration: none; background: var(--colex-card, #fff); border-top: 1px solid var(--colex-border-light); }
.call-map-ext-link:hover { text-decoration: underline; }

/* ---- TERMIN SECTION ---- */
.call-termin-section { margin-top: 16px; padding: 12px 14px; background: var(--colex-hover, #f8f9fb); border-radius: 8px; border: 1px solid var(--colex-border-light); }
.call-termin-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--colex-text); user-select: none; }
.call-check { width: 15px; height: 15px; accent-color: #00a862; cursor: pointer; flex-shrink: 0; }
#callTerminDetails .colex-prompt-input { margin-bottom: 0 !important; }
.call-gcal-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #eef4ff; border-radius: 6px; font-size: 12px; font-weight: 500; color: #4285F4; cursor: pointer; }
.call-modal-foot { border-top: 1px solid var(--colex-border-light); margin-top: 20px; padding-top: 14px; gap: 10px; }

/* ---- CALL NOTE CARDS ---- */
.csb-update-card.csb-call-card { background: #f0fdf4; border-left: 3px solid #00c875; }
.csb-update-card.csb-call-card .csb-update-body { background: transparent; }
.csb-call-note-content { display: flex; flex-direction: column; gap: 5px; }
.csb-call-meta-line { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--colex-text); line-height: 1.4; }
.csb-call-meta-line svg { flex-shrink: 0; color: #00a862; }
.csb-call-meta-line.csb-call-title { font-size: 14px; margin-bottom: 2px; }
.csb-call-notes-text { margin-top: 6px; font-size: 13px; color: var(--colex-text); line-height: 1.6; padding-top: 6px; border-top: 1px solid rgba(0,200,117,0.15); white-space: pre-wrap; }

/* ---- LIGHTBOX ---- */
.colex-lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.82); z-index: 20000; align-items: center; justify-content: center; cursor: zoom-out; animation: colexFadeIn 0.18s ease; }
.colex-lightbox-img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); object-fit: contain; cursor: default; }
.colex-lightbox-close { position: absolute; top: 18px; right: 22px; color: white; font-size: 32px; cursor: pointer; line-height: 1; opacity: 0.7; transition: opacity 0.15s; font-weight: 300; }
.colex-lightbox-close:hover { opacity: 1; }
@keyframes colexFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- BOARD DROPDOWN ARCHIVE BUTTON ---- */
.colex-board-item { display: flex !important; align-items: center; gap: 4px; }
.colex-board-item .colex-board-item-name { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0; cursor: pointer; }
.colex-board-item .colex-board-archive-btn { opacity: 0; transition: opacity 0.15s; flex-shrink: 0; }
.colex-board-item:hover .colex-board-archive-btn { opacity: 1; }

/* ---- SUBTASK COLUMN RESIZER ---- */
.colex-subtasks-table th { position: relative; font-size: 11px; color: var(--colex-text-gray); font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--colex-border-light); padding: 4px 8px; }
.colex-sub-resizer { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 15; transition: background 0.2s; }
.colex-sub-resizer:hover, .colex-sub-resizer.active { background-color: var(--colex-blue); }

/* ---- CALL BUTTON IN COMMENT FOOTER ---- */
.csb-call-comment-btn { color: var(--colex-text-gray) !important; }
.csb-call-comment-btn:hover { color: #00c875 !important; background: rgba(0,200,117,0.08) !important; }

/* ---- GOOGLE CALENDAR PANEL ---- */
.gcal-panel { width: 460px; max-width: 96vw; height: 100%; background: white; display: flex; flex-direction: column; border-left: 1px solid var(--colex-border-light); box-shadow: -6px 0 24px rgba(0,0,0,0.12); overflow: hidden; }
.gcal-panel-header { padding: 14px 18px; border-bottom: 1px solid var(--colex-border-light); display: flex; align-items: center; gap: 10px; background: white; flex-shrink: 0; }
.gcal-event-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--colex-border-light); transition: background 0.1s; }
.gcal-event-card:hover { background: var(--colex-hover); }
.gcal-event-main { flex: 1; min-width: 0; }
.gcal-event-date { font-size: 11px; color: var(--colex-text-gray); margin-bottom: 3px; display: flex; align-items: center; gap: 5px; }
.gcal-event-title { font-size: 13px; font-weight: 500; color: var(--colex-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 2px; }
.gcal-event-meta { font-size: 11px; color: var(--colex-text-gray); display: flex; align-items: center; gap: 3px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcal-event-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.gcal-date-badge { font-weight: 600; color: #4285F4; }
.gcal-time { color: var(--colex-text-gray); }
.gcal-empty { padding: 40px; text-align: center; color: var(--colex-text-gray); font-size: 14px; }

/* ---- VIEW TABS (Board / Kalender-Ansicht) ---- */
.colex-view-tabs { display: flex; gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--colex-border-light); background: var(--colex-bg); }
.colex-view-tab { display: flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13px; font-weight: 500; color: var(--colex-text-gray); background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: color 0.15s, border-color 0.15s; margin-bottom: -1px; }
.colex-view-tab .material-symbols-outlined { font-size: 17px; }
.colex-view-tab:hover { color: var(--colex-text); }
.colex-view-tab.is-active { color: var(--colex-blue); border-bottom-color: var(--colex-blue); font-weight: 600; }

/* ---- VIEW SWITCHER (toolbar integration) ---- */
.colex-view-switcher { display: flex; gap: 0; padding: 0; }
.colex-vs-btn { display: flex; align-items: center; gap: 7px; padding: 9px 20px; font-size: 13px; font-weight: 500; color: var(--colex-text-gray); background: var(--colex-hover); border: 1px solid var(--colex-border-light); cursor: pointer; transition: all .15s; }
.colex-vs-btn:first-child { border-radius: 8px 0 0 8px; border-right: none; }
.colex-vs-btn:last-child { border-radius: 0 8px 8px 0; }
.colex-vs-btn .material-symbols-outlined { font-size: 17px; }
.colex-vs-btn:hover { background: var(--colex-border-light); color: var(--colex-text); }
.colex-vs-btn.is-active { background: var(--colex-blue); color: #fff; border-color: var(--colex-blue); font-weight: 600; }
.colex-vs-btn.is-active .material-symbols-outlined { color: #fff; }

/* ---- MAIN CALENDAR WRAPPER ---- */
.colex-main-calendar { padding: 0 0 60px 0; background: #fff; border-radius: 8px; flex: 1; overflow-y: auto; }
.colex-cal-header { display: flex; align-items: center; gap: 8px; padding: 14px 20px 10px; }
.colex-cal-nav-btn { padding: 5px 8px !important; }
.colex-cal-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--colex-text); min-width: 180px; }
.colex-cal-view-switch { display: flex; border: 1px solid var(--colex-border); border-radius: 6px; overflow: hidden; }
.colex-cal-vs-btn { padding: 5px 14px; font-size: 12px; font-weight: 500; background: transparent; border: none; cursor: pointer; color: var(--colex-text-gray); transition: background 0.15s; }
.colex-cal-vs-btn:hover { background: var(--colex-hover); }
.colex-cal-vs-btn.is-active { background: var(--colex-blue); color: white; }

/* ---- MONTH GRID ---- */
.colex-cal-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--colex-bg); border-bottom: 1px solid var(--colex-border-light); border-left: 1px solid var(--colex-border-light); padding: 0 20px; }
.colex-cal-weekdays div { padding: 6px 10px; font-size: 11px; font-weight: 700; color: var(--colex-text-gray); text-transform: uppercase; letter-spacing: 0.05em; text-align: center; overflow: hidden; }
.colex-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; padding: 0 20px; border-left: 1px solid var(--colex-border-light); }
.colex-cal-day { min-height: 30px; border-right: 1px solid var(--colex-border-light); border-bottom: 1px solid var(--colex-border-light); padding: 8px 6px 6px; cursor: pointer; transition: background 0.1s; display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; width: 100%; box-sizing: border-box; }
.colex-cal-day:hover { background: var(--colex-hover); }
.colex-cal-day.is-today .colex-cal-day-num { background: var(--colex-blue); color: white; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.colex-cal-day.is-other-month { background: var(--colex-bg); opacity: 0.5; }
.colex-cal-day-num { font-size: 13px; font-weight: 500; color: var(--colex-text); width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.colex-cal-day-pills { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow: hidden; width: 100%; }

/* ---- EVENT PILLS ---- */
.colex-cal-pill { font-size: 11px; padding: 2px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; line-height: 1.5; display: block; max-width: 100%; box-sizing: border-box; }
.colex-cal-pill-gcal { background: #dbeafe; border-left: 2px solid #3b82f6; color: #1e40af; }
.colex-cal-pill-task { font-weight: 500; }
.colex-cal-pill:hover { opacity: 0.82; }
.colex-cal-more { font-size: 10.5px; color: var(--colex-text-gray); padding-left: 4px; }

/* ---- CALENDAR LEGEND ---- */
.colex-cal-legend { display: flex; align-items: center; gap: 16px; padding: 7px 20px; background: var(--colex-bg, #f7f8fa); border-bottom: 1px solid var(--colex-border-light); font-size: 12px; color: var(--colex-text-gray); }
.colex-cal-legend-item { display: flex; align-items: center; gap: 5px; }
.colex-cal-legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ---- WEEK GRID ---- */
.colex-cal-week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; padding: 0 20px; border-left: 1px solid var(--colex-border-light); min-height: 400px; background: #fff; }
.colex-cal-week-col { border-right: 1px solid var(--colex-border-light); border-bottom: 1px solid var(--colex-border-light); display: flex; flex-direction: column; cursor: pointer; transition: background 0.1s; min-width: 0; overflow: hidden; }
.colex-cal-week-col:hover { background: var(--colex-hover); }
.colex-cal-week-col.is-today { background: rgba(88, 149, 255, 0.04); }
.colex-cal-week-head { display: flex; flex-direction: column; align-items: center; padding: 10px 6px 6px; border-bottom: 1px solid var(--colex-border-light); gap: 3px; }
.colex-cal-week-dn { font-size: 11px; font-weight: 700; color: var(--colex-text-gray); text-transform: uppercase; letter-spacing: 0.05em; }
.colex-cal-week-num { font-size: 18px; font-weight: 300; color: var(--colex-text); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.colex-cal-week-num.is-today { background: var(--colex-blue); color: white; font-weight: 700; }
.colex-cal-week-body { padding: 6px 4px; display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow: hidden; }

/* ---- FIX CALL MODAL (scroll if content is tall) ---- */
.call-modal-inner { max-height: 93vh; overflow-y: auto; }
.colex-dialog.call-modal-inner { max-width: 380px !important; }
/* ---- GOOGLE PLACES PAC DROPDOWN ---- */
.pac-container { z-index: 20000 !important; }

/* ---- CALENDAR EVENT MODAL ---- */
.cal-event-modal-inner { max-width: 380px; width: 94%; max-height: 95vh; overflow-y: auto; display: flex; flex-direction: column; padding: 24px 22px 20px; gap: 0; }
.cal-ev-time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.cal-ev-meet-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #e8f5e9; border-radius: 8px; font-size: 13px; color: #2e7d32; cursor: pointer; border: 1px solid #c8e6c9; margin-bottom: 6px; }
.cal-ev-meet-row:hover { background: #dcedc8; }
.cal-ev-meet-row input[type="checkbox"] { width: 15px; height: 15px; flex-shrink: 0; }

/* ---- CALENDAR GOOGLE STATUS BAR ---- */
.colex-cal-gsync { display: flex; align-items: center; gap: 6px; margin-left: 10px; }
.colex-cal-gcal-dot { width: 8px; height: 8px; border-radius: 50%; background: #c5c7d4; flex-shrink: 0; }
.colex-cal-gcal-dot.connected { background: #4285F4; }

/* ---- CALENDAR PILL IMPROVEMENTS ---- */
.colex-cal-pill { transition: opacity .15s; }

/* ---- CALENDAR EVENT ATTENDEES ---- */
.cal-attendees-wrap { margin-top: 2px; }
.cal-attendees-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; margin-bottom: 6px; }
.cal-attendee-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 10px; background: #e8f0fe; color: #1a56db; border-radius: 20px; font-size: 12px; font-weight: 500; }
.cal-attendee-tag button { background: none; border: none; cursor: pointer; color: #1a56db; font-size: 15px; line-height: 1; padding: 0 0 0 2px; opacity: .7; }
.cal-attendee-tag button:hover { opacity: 1; }

/* ---- CALENDAR PILL FIT-WIDTH ---- */
.colex-cal-day-pills { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; }

/* ---- FLATPICKR INPUT STYLE ---- */
.flatpickr-input[readonly] { cursor: pointer !important; }

/* ---- FLATPICKR CALENDAR REDESIGN ---- */
.flatpickr-calendar { font-family: 'Inter', system-ui, sans-serif !important; border-radius: 12px !important; box-shadow: 0 8px 28px rgba(0,0,0,0.16) !important; border: 1px solid var(--colex-border) !important; padding: 0 !important; overflow: hidden; }
.flatpickr-months { background: var(--colex-blue, #0073ea) !important; border-radius: 12px 12px 0 0 !important; padding: 2px 0 !important; }
.flatpickr-month { background: transparent !important; color: #fff !important; fill: #fff !important; height: 36px !important; }
.flatpickr-current-month { font-size: 14px !important; font-weight: 600 !important; padding-top: 6px !important; color: #fff !important; }
.flatpickr-current-month .numInputWrapper input, .flatpickr-current-month select.flatpickr-monthDropdown-months { color: #fff !important; background: transparent !important; font-weight: 600 !important; }
.flatpickr-current-month .arrowUp, .flatpickr-current-month .arrowDown { border-bottom-color: rgba(255,255,255,0.7) !important; border-top-color: rgba(255,255,255,0.7) !important; }
.flatpickr-prev-month, .flatpickr-next-month { padding: 8px 10px !important; }
.flatpickr-prev-month svg, .flatpickr-next-month svg { fill: rgba(255,255,255,0.85) !important; }
.flatpickr-prev-month:hover svg, .flatpickr-next-month:hover svg { fill: #fff !important; }
.flatpickr-weekdays { background: #fff !important; border-bottom: 1px solid var(--colex-border-light) !important; height: 30px !important; }
span.flatpickr-weekday { background: #fff !important; color: var(--colex-text-gray) !important; font-size: 10.5px !important; font-weight: 700 !important; letter-spacing: 0.04em !important; text-transform: uppercase !important; }
.flatpickr-days { border: none !important; }
.dayContainer { padding: 4px 8px 8px !important; min-width: unset !important; max-width: 100% !important; }
.flatpickr-calendar .flatpickr-day { display: flex !important; align-items: center !important; justify-content: center !important; line-height: 1 !important; border-radius: 7px !important; font-size: 12.5px !important; height: 33px !important; max-width: 33px !important; margin: 1px !important; color: var(--colex-text, #323338) !important; border: 1.5px solid transparent !important; }
.flatpickr-calendar .flatpickr-day:hover { background: var(--colex-hover, #f0f2f5) !important; border-color: transparent !important; }
.flatpickr-calendar .flatpickr-day.selected, .flatpickr-calendar .flatpickr-day.selected:hover, .flatpickr-calendar .flatpickr-day.selected:focus { background: var(--colex-blue, #0073ea) !important; border-color: var(--colex-blue, #0073ea) !important; color: #fff !important; font-weight: 700 !important; }
.flatpickr-calendar .flatpickr-day.today { border-color: var(--colex-blue, #0073ea) !important; color: var(--colex-blue, #0073ea) !important; font-weight: 700 !important; background: transparent !important; }
.flatpickr-calendar .flatpickr-day.today:hover { background: var(--colex-blue, #0073ea) !important; color: #fff !important; }
.flatpickr-calendar .flatpickr-day.prevMonthDay, .flatpickr-calendar .flatpickr-day.nextMonthDay { color: #c5c7d4 !important; }
.flatpickr-calendar .flatpickr-day.flatpickr-disabled { color: #d8dae5 !important; }
.flatpickr-calendar.hasTime .flatpickr-time { border-top: 1px solid var(--colex-border-light) !important; background: #f8f9fb !important; border-radius: 0 0 12px 12px !important; height: 44px !important; }
.flatpickr-time input.flatpickr-hour, .flatpickr-time input.flatpickr-minute { font-size: 15px !important; font-weight: 700 !important; color: var(--colex-text, #323338) !important; font-family: 'Inter', system-ui, sans-serif !important; }
.flatpickr-time .flatpickr-time-separator { color: var(--colex-text-gray) !important; font-weight: 700 !important; font-size: 15px !important; }
.flatpickr-time .numInputWrapper span { border-color: transparent !important; }
.flatpickr-time .numInputWrapper span:hover { background: var(--colex-hover, #f0f2f5) !important; }

/* ---- FOOTER FIX (tasks page) ---- */
/* Removed height:auto override that broke internal board scrolling */

/* ---- AUTOMATION TOAST ---- */
.colex-toast { position: fixed; top: 76px; left: 50%; transform: translateX(-50%) translateY(-16px); padding: 11px 22px 11px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; z-index: 99999; opacity: 0; transition: opacity .3s, transform .3s; white-space: nowrap; box-shadow: 0 4px 20px rgba(0,0,0,0.18); pointer-events: none; display: flex; align-items: center; gap: 8px; }
.colex-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.colex-toast.colex-toast-success { background: #00c875; color: #fff; }
.colex-toast.colex-toast-error { background: #e2445c; color: #fff; }
.colex-toast.colex-toast-info { background: #323338; color: #fff; }
