:root {
  --bs-primary: #3489c6;
  --bs-primary-active: #2970a1;
  --bs-primary-rgb: 52, 137, 198;
  --bs-body-font-size: 0.875rem;
  --border: #d9d9d9;
  /* --bg: #f6f6f4; Z */
  --bg: #FFFFFF;
  --bg-active: #f0f9fa;
  --text: #241c15;
  --text-light: #f6f6f4;
  --badge-bg: #241c15;
  --bs-badge-color:#241c15;
  --primary: #3489c6;
  --bs-btn-hover-color: #241c15;
  --success: #00a862;
  --danger: #d63301;
  --radius: #3489c6;
  --bs-border-radius: 1px;
  --bs-nav-link-color: #241c15;
  --bs-link-color:#241c15;
  --bs-border-radius-sm: 1px;
  --skeleton-base: #e0e0e0;
  --skeleton-highlight: #f0f0f0;

  --bs-secondary: #F0EFED;
  --bs-secondary-rgb: 240, 239, 237;

  --bs-light-rgb: 240, 239, 237;

  --bs-list-group-item-padding-y: 0;
  --bs-list-group-item-padding-x: 0;
  --bs-list-group-border-width: 0;
  --bs-offcanvas-padding-y: 0;
  --bs-offcanvas-padding-x: 0;

  --bs-offcanvas-zindex: 4000;

}

body {
  background-color: var(--bg);;
  overflow-x: hidden;
  font-family: "Google Sans", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

:root {
  --sidebar-full: 280px;
  --sidebar-mini: 70px;
}

:root, [data-bs-theme=light] {
  --bs-primary: #3489c6;
  --bs-primary-rgb: 52, 137, 198;

}

.dropdown-menu {
  --bs-dropdown-link-active-color: var(--text);
}

.dropdown-menu.active {
  --bs-dropdown-link-active-color: var(--text);
}

.bg-light-primary {
  background-color: rgba(var(--bs-primary-rgb), 0.2) !important;
}

.nav-tabs, .nav {
  --bs-nav-tabs-link-active-border-color: #3489c6;
  --bs-primary: #3489c6;
}

.navbar-nav {
  --bs-nav-link-font-size: 0.875rem;
}





.form-select{
  border: 1px solid var(--border);
}

[class^='select2'] {
  border-radius: 0px !important;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.btn {
  --bs-btn-font-size: 0.875rem;
  --bs-primary: #3489c6;
  --bs-btn-active-bg: #F0EFED;
  --bs-btn-hover-bg: #F0EFED;
  --bs-btn-hover-border-color: #F0EFED;
  --bs-btn-active-color: var(--text);
  /* width: auto !important; */
}

.btn:hover {
  background-color: var(--bg-active);
  color: var(--text);
  white-space: nowrap;
}
.btn-primary {
  background: var(--border);
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  /* padding: 14px; */
  font-size: 15px;
  color: #666;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:not(:disabled) {
  background: var(--primary);
  color: var(--text-light);
  cursor: pointer;
}

.btn-primary:not(:disabled):hover {
  background:var(--bs-primary-active);
}

.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-outline-primary:hover {
  background: var(--bg);
}

.btn-outline-primary:active {
  background: var(--bg);
}

.btn-primary {
  background-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--bs-primary);
  border-color:var(--bs-primary);
}

.btn-success {
  background-color: var(--success);
  border-color: var(--success);
}

.btn-success:hover,
.btn-success:focus {
  background-color: var(--success);
  border-color: var(--success);
}

.btn-danger {
  background-color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover,
.btn-danger:focus {
  background-color:var(--danger);
  border-color: var(--danger);
}

.dropdown-menu {
--bs-dropdown-font-size: 0.875rem;
}

.form-control {
font-size: 0.875rem;
line-height: 24px;
}

/* giữ border bình thường nhưng chỉ bỏ màu xanh focus  */
.form-control:focus {
  box-shadow: none !important;
}

.menu-vertical .menu-item .menu-link.active-folder {
border-left: 3px solid var(--bs-primary);
border-radius: 0;
font-weight: 500;
transform: translateX(-3px);
}

.menu-vertical .menu-item .menu-link {
font-size: 14px;;
}
.menu-link .folder-link:hover {
transition: all 0.3s ease;
font-weight: 500;
color: var(--bs-primary);
}

.material-symbols-rounded {
font-size: inherit;
/* transform: scale(1.2) ; */
}

.form-control[type="datetime-local"] {
height: 38px;;
}

#userSuggestions {
  max-height: 200px;
  overflow-y: auto;
  border-radius: 0.375rem;
  padding: 0;
}

#userSuggestions .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#userSuggestions .dropdown-item:hover {
  background-color: #f8f9fa;
}

#userSuggestions .dropdown-item.active {
  background-color: #e9ecef;
  color: #000;
  font-weight: 500;
}

#userSuggestions:not(.d-none) {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(5px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.coming-soon {
cursor: not-allowed;
color: #6c757d;
opacity: 0.6;
/* pointer-events: none; */
}

.coming-soon input,
.coming-soon label {
pointer-events: none;
}

.coming-soon:hover::after {
opacity: 1;
}

coming-soon::after {
position: absolute;
top: -1.8em;
left: 50%;
transform: translateX(-50%);
background: #000;
color: #fff;
padding: 4px 8px;
font-size: 0.75rem;
border-radius: 4px;
white-space: nowrap;
opacity: 0;
transition: opacity 0.2s;
z-index: 10;
}

label.required::after {
content: " *";
color: #ea5455;
font-weight: bold;
}

[data-bs-theme=dark] .board-panel-status-label {
--bs-dark-rgb: #333;
--bs-text-opacity: 1;
}

.dropdown .dropdown-menu {
position: absolute !important;
z-index: 99999 !important;
}

/* ==================== A HA thêm CSS dưới cho Chatbox AI ==================== */
#ai-chat-widget {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 99998;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ai-chat-toggle {
width: 56px;
height: 56px;
border-radius: 50%;
background: linear-gradient(135deg, var(--bs-primary), #2a73a8);
border: none;
color: white;
cursor: pointer;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
}

.ai-chat-toggle:hover {
transform: scale(1.05);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.ai-chat-toggle:active {
transform: scale(0.95);
}

.ai-chat-toggle.active {
background: linear-gradient(135deg, #2a73a8, var(--bs-primary));
}

.ai-chat-toggle svg {
transition: transform 0.3s ease;
}

.ai-chat-toggle:hover svg {
transform: scale(1.1);
}

/* Chat Box Container */
.ai-chat-box {
position: absolute;
bottom: 70px;
right: 0;
width: 380px;
max-width: calc(100vw - 40px);
height: 550px;
max-height: calc(100vh - 120px);
background: white;
border-radius: 12px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
display: flex;
flex-direction: column;
overflow: hidden;
animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* A HA test lại responsive bằng CSS thuần thôi, Shuwu hay đũng có muốn responsive bằng Bootstrap thì sửa lại giúp a nhé :> */
@keyframes slideUp {
from {
  opacity: 0;
  transform: translateY(20px);
}
to {
  opacity: 1;
  transform: translateY(0);
}
}

[data-bs-theme=dark] .ai-chat-box {
background: #1e1e1e;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.ai-chat-header {
background: linear-gradient(135deg, var(--bs-primary), #2a73a8);
color: white;
padding: 16px 20px;
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
}

.ai-chat-header-content {
display: flex;
align-items: center;
gap: 10px;
}

.ai-chat-title {
margin: 0;
font-size: 16px;
font-weight: 600;
}

.ai-chat-close-btn {
background: rgba(255, 255, 255, 0.2);
border: none;
width: 32px;
height: 32px;
border-radius: 50%;
color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s ease;
}

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

.ai-chat-messages {
flex: 1;
overflow-y: auto;
padding: 20px;
background: #f8f9fa;
display: flex;
flex-direction: column;
gap: 16px;
}

[data-bs-theme=dark] .ai-chat-messages {
background: #2a2a2a;
}

.ai-chat-messages::-webkit-scrollbar {
width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-track {
background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2);
border-radius: 3px;
}

.ai-chat-messages::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.3);
}

[data-bs-theme=dark] .ai-chat-messages::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
}

[data-bs-theme=dark] .ai-chat-messages::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.3);
}

.ai-chat-welcome {
text-align: center;
padding: 40px 20px;
color: #6c757d;
}

.ai-chat-welcome-icon {
margin-bottom: 16px;
color: var(--bs-primary);
}

.ai-chat-welcome-text {
margin: 0;
font-size: 15px;
line-height: 1.5;
}

.ai-chat-message {
display: flex;
gap: 10px;
animation: messageSlideIn 0.3s ease;
}

/* A HA test lại responsive bằng CSS thuần thôi, Shuwu hay đũng có muốn responsive bằng Bootstrap thì sửa lại giúp a nhé :> */
@keyframes messageSlideIn {
from {
  opacity: 0;
  transform: translateY(10px);
}
to {
  opacity: 1;
  transform: translateY(0);
}
}

.ai-chat-message-content {
max-width: 85%;
display: flex;
flex-direction: column;
gap: 8px;
}

/* User Message */
.ai-chat-message-user {
justify-content: flex-end;
}

.ai-chat-message-user .ai-chat-message-content {
align-items: flex-end;
}

.ai-chat-message-user .ai-chat-message-text {
background: var(--bs-primary);
color: white;
padding: 10px 14px;
border-radius: 16px 16px 4px 16px;
font-size: 14px;
line-height: 1.5;
word-wrap: break-word;
}

.ai-chat-message-ai {
justify-content: flex-start;
}

.ai-chat-message-ai .ai-chat-message-content {
align-items: flex-start;
max-width: 100%;
}

.ai-chat-thinking {
background: white;
border: 1px solid #e0e0e0;
border-radius: 12px;
padding: 12px;
font-size: 13px;
max-width: 100%;
}

[data-bs-theme=dark] .ai-chat-thinking {
background: #333;
border-color: #444;
}

.ai-chat-thinking-header {
display: flex;
align-items: center;
gap: 6px;
color: #6c757d;
font-weight: 600;
margin-bottom: 8px;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.ai-chat-thinking-content {
color: #666;
line-height: 1.6;
white-space: pre-wrap;
word-wrap: break-word;
font-family: 'Courier New', monospace;
font-size: 12px;
max-height: 150px;
overflow-y: auto;
padding: 8px;
background: #f8f9fa;
border-radius: 6px;
}

[data-bs-theme=dark] .ai-chat-thinking-content {
color: #aaa;
background: #2a2a2a;
}

.ai-chat-answer {
background: white;
border: 1px solid #e0e0e0;
border-radius: 12px;
padding: 14px;
max-width: 100%;
}

[data-bs-theme=dark] .ai-chat-answer {
background: #333;
border-color: #444;
}

.ai-chat-answer-content {
color: #2c3e50;
font-size: 14px;
line-height: 1.7;
white-space: pre-wrap;
word-wrap: break-word;
}

[data-bs-theme=dark] .ai-chat-answer-content {
color: #e0e0e0;
}

.ai-chat-answer-content code {
background: #f4f4f4;
padding: 2px 6px;
border-radius: 4px;
font-family: 'Courier New', monospace;
font-size: 13px;
color: #e83e8c;
}

[data-bs-theme=dark] .ai-chat-answer-content code {
background: #2a2a2a;
color: #ff79c6;
}

.ai-chat-answer-content strong {
font-weight: 600;
color: #1a1a1a;
}

[data-bs-theme=dark] .ai-chat-answer-content strong {
color: #fff;
}

.ai-chat-answer-content em {
font-style: italic;
color: #555;
}

[data-bs-theme=dark] .ai-chat-answer-content em {
color: #ccc;
}

.ai-chat-error {
background: #fff5f5;
border: 1px solid #feb2b2;
border-radius: 12px;
padding: 12px;
display: flex;
gap: 10px;
align-items: flex-start;
animation: messageSlideIn 0.3s ease;
}

[data-bs-theme=dark] .ai-chat-error {
background: #4a2020;
border-color: #e53e3e;
}

.ai-chat-error-icon {
color: #f56565;
flex-shrink: 0;
}

.ai-chat-error-text {
color: #c53030;
font-size: 13px;
line-height: 1.5;
}

[data-bs-theme=dark] .ai-chat-error-text {
color: #fc8181;
}

.ai-chat-loading {
display: flex;
justify-content: center;
padding: 12px;
animation: messageSlideIn 0.3s ease;
}

.ai-chat-loading-dots {
display: flex;
gap: 6px;
}

.ai-chat-loading-dots span {
width: 8px;
height: 8px;
background: var(--bs-primary);
border-radius: 50%;
animation: dotPulse 1.4s infinite ease-in-out;
}

.ai-chat-loading-dots span:nth-child(1) {
animation-delay: -0.32s;
}

.ai-chat-loading-dots span:nth-child(2) {
animation-delay: -0.16s;
}

/* A HA test lại responsive bằng CSS thuần thôi, Shuwu hay đũng có muốn responsive bằng Bootstrap thì sửa lại giúp a nhé :> */
@keyframes dotPulse {
0%, 80%, 100% {
  transform: scale(0.6);
  opacity: 0.5;
}
40% {
  transform: scale(1);
  opacity: 1;
}
}

.ai-chat-input-wrapper {
flex-shrink: 0;
padding: 16px;
background: white;
border-top: 1px solid #e0e0e0;
}

[data-bs-theme=dark] .ai-chat-input-wrapper {
background: #1e1e1e;
border-top-color: #444;
}

.ai-chat-form {
display: flex;
gap: 10px;
align-items: flex-end;
}

.ai-chat-input {
flex: 1;
border: 1px solid #dee2e6;
border-radius: 20px;
padding: 10px 16px;
font-size: 14px;
line-height: 1.5;
resize: none;
outline: none;
transition: border-color 0.2s ease;
max-height: 120px;
overflow-y: auto;
font-family: inherit;
}

.ai-chat-input:focus {
border-color: var(--bs-primary);
}

.ai-chat-input:disabled {
background: #f8f9fa;
cursor: not-allowed;
}

[data-bs-theme=dark] .ai-chat-input {
background: #2a2a2a;
border-color: #444;
color: #e0e0e0;
}

[data-bs-theme=dark] .ai-chat-input:disabled {
background: #1a1a1a;
}

.ai-chat-input::-webkit-scrollbar {
width: 6px;
}

.ai-chat-input::-webkit-scrollbar-track {
background: transparent;
}

.ai-chat-input::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2);
border-radius: 3px;
}

.ai-chat-send-btn {
width: 40px;
height: 40px;
border-radius: 50%;
background: var(--bs-primary);
border: none;
color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
flex-shrink: 0;
}

.ai-chat-send-btn:hover {
background: #2a73a8;
transform: scale(1.05);
}

.ai-chat-send-btn:active {
transform: scale(0.95);
}

.ai-chat-send-btn:disabled {
background: #ccc;
cursor: not-allowed;
transform: scale(1);
}

/* A HA test lại responsive bằng CSS thuần thôi, Shuwu hay đũng có muốn responsive bằng Bootstrap thì sửa lại giúp a nhé :> */
@media (max-width: 480px) {
#ai-chat-widget {
  bottom: 10px;
  right: 10px;
}

.ai-chat-box {
  width: calc(100vw - 20px);
  height: calc(100vh - 100px);
  bottom: 60px;
}

.ai-chat-toggle {
  width: 50px;
  height: 50px;
}
}

/* ==================== Phần dưới này là CSS của Cái Box chat gợi ý tạo task nhe mấy đứa ==================== */

#ai-task-suggestion-widget {
position: fixed;
bottom: 20px;
right: 90px;
z-index: 99997;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ai-task-toggle {
width: 56px;
height: 56px;
border-radius: 50%;
background: linear-gradient(135deg, #10b981, #059669);
border: none;
color: white;
cursor: pointer;
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
}

.ai-task-toggle:hover {
transform: scale(1.05);
box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.ai-task-toggle:active {
transform: scale(0.95);
}

.ai-task-toggle.active {
background: linear-gradient(135deg, #059669, #10b981);
}

.ai-task-box {
position: absolute;
bottom: 70px;
right: 0;
width: 450px;
max-width: calc(100vw - 40px);
height: 600px;
max-height: calc(100vh - 120px);
background: white;
border-radius: 12px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
display: flex;
flex-direction: column;
overflow: hidden;
animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
transition: right 0.3s ease;
}

.ai-task-box.shifted-left {
right: 400px;
}

[data-bs-theme=dark] .ai-task-box {
background: #1e1e1e;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.ai-task-header {
background: linear-gradient(135deg, #10b981, #059669);
color: white;
padding: 16px 20px;
display: flex;
align-items: center;
justify-content: space-between;
flex-shrink: 0;
}

.ai-task-header-content {
display: flex;
align-items: center;
gap: 10px;
}

.ai-task-title {
margin: 0;
font-size: 16px;
font-weight: 600;
}

.ai-task-close-btn {
background: rgba(255, 255, 255, 0.2);
border: none;
width: 32px;
height: 32px;
border-radius: 50%;
color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s ease;
}

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

.ai-task-content {
flex: 1;
overflow-y: auto;
padding: 20px;
background: #f8f9fa;
}

[data-bs-theme=dark] .ai-task-content {
background: #2a2a2a;
}

.ai-task-content::-webkit-scrollbar {
width: 6px;
}

.ai-task-content::-webkit-scrollbar-track {
background: transparent;
}

.ai-task-content::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2);
border-radius: 3px;
}

[data-bs-theme=dark] .ai-task-content::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
}

.ai-task-welcome {
text-align: center;
padding: 40px 20px;
color: #6c757d;
}

.ai-task-welcome-icon {
margin-bottom: 20px;
color: #10b981;
}

.ai-task-welcome-text {
margin: 0 0 12px 0;
font-size: 15px;
line-height: 1.5;
font-weight: 500;
}

.ai-task-welcome-hint {
margin: 0;
font-size: 13px;
color: #9ca3af;
font-style: italic;
}

.ai-task-input-wrapper {
flex-shrink: 0;
padding: 16px;
background: white;
border-top: 1px solid #e0e0e0;
}

[data-bs-theme=dark] .ai-task-input-wrapper {
background: #1e1e1e;
border-top-color: #444;
}

.ai-task-form {
display: flex;
gap: 10px;
align-items: flex-end;
}

.ai-task-input {
flex: 1;
border: 1px solid #dee2e6;
border-radius: 20px;
padding: 10px 16px;
font-size: 14px;
line-height: 1.5;
resize: none;
outline: none;
transition: border-color 0.2s ease;
max-height: 100px;
overflow-y: auto;
font-family: inherit;
}

.ai-task-input:focus {
border-color: #10b981;
}

.ai-task-input:disabled {
background: #f8f9fa;
cursor: not-allowed;
}

[data-bs-theme=dark] .ai-task-input {
background: #2a2a2a;
border-color: #444;
color: #e0e0e0;
}

.ai-task-send-btn {
width: 40px;
height: 40px;
border-radius: 50%;
background: #10b981;
border: none;
color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
flex-shrink: 0;
}

.ai-task-send-btn:hover {
background: #059669;
transform: scale(1.05);
}

.ai-task-send-btn:disabled {
background: #ccc;
cursor: not-allowed;
transform: scale(1);
}

.ai-task-loading {
text-align: center;
padding: 60px 20px;
animation: messageSlideIn 0.3s ease;
}

.ai-task-loading-spinner {
width: 48px;
height: 48px;
margin: 0 auto 20px;
border: 4px solid #e5e7eb;
border-top-color: #10b981;
border-radius: 50%;
animation: spin 1s linear infinite;
}

@keyframes spin {
to { transform: rotate(360deg); }
}

.ai-task-loading p {
color: #6c757d;
font-size: 14px;
margin: 0;
}

.ai-task-error {
background: #fff5f5;
border: 1px solid #feb2b2;
border-radius: 12px;
padding: 20px;
text-align: center;
animation: messageSlideIn 0.3s ease;
}

[data-bs-theme=dark] .ai-task-error {
background: #4a2020;
border-color: #e53e3e;
}

.ai-task-error-icon {
color: #f56565;
margin-bottom: 12px;
}

.ai-task-error-text {
color: #c53030;
font-size: 14px;
line-height: 1.5;
margin-bottom: 16px;
}

[data-bs-theme=dark] .ai-task-error-text {
color: #fc8181;
}

.ai-task-retry-btn {
background: #10b981;
color: white;
border: none;
padding: 8px 20px;
border-radius: 8px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: background 0.2s ease;
}

.ai-task-retry-btn:hover {
background: #059669;
}

.ai-task-suggestion-result {
animation: messageSlideIn 0.3s ease;
}

.ai-task-success-message {
background: #d1fae5;
border: 1px solid #a7f3d0;
border-radius: 8px;
padding: 12px 16px;
margin-bottom: 20px;
display: flex;
align-items: center;
gap: 10px;
color: #065f46;
font-size: 14px;
}

[data-bs-theme=dark] .ai-task-success-message {
background: #064e3b;
border-color: #047857;
color: #d1fae5;
}

.ai-task-success-message svg {
flex-shrink: 0;
}

.ai-task-structure {
margin-bottom: 20px;
}

.task-item {
background: white;
border: 2px solid #e5e7eb;
border-radius: 10px;
padding: 7px;
margin-bottom: 10px;
transition: all 0.2s ease;
}

[data-bs-theme=dark] .task-item {
background: #333;
border-color: #444;
}

.task-item.task-parent {
border-color: #10b981;
box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.task-item.task-child {
margin-left: 24px;
border-color: #d1d5db;
position: relative;
}

.task-item.task-child::before {
content: '';
position: absolute;
left: -16px;
top: 50%;
width: 12px;
height: 2px;
background: #d1d5db;
}

.task-item-header {
display: flex;
align-items: flex-start;
gap: 12px;
position: relative;
}

.task-item-icon {
color: #10b981;
flex-shrink: 0;
margin-top: 2px;
}

.task-child .task-item-icon {
color: #6b7280;
}

.task-item-content {
flex: 1;
}

.task-item-delete {
background: transparent;
border: none;
color: #ef4444;
cursor: pointer;
padding: 4px;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
opacity: 0.6;
flex-shrink: 0;
}

.task-item-delete:hover {
opacity: 1;
background: #fee2e2;
transform: scale(1.1);
}

[data-bs-theme=dark] .task-item-delete:hover {
background: #7f1d1d;
}

.task-item:hover .task-item-delete {
opacity: 1;
}

.task-item-title {
font-weight: 600;
font-size: 14px;
color: #1f2937;
margin-bottom: 6px;
line-height: 1.4;
padding: 4px;
border-radius: 4px;
transition: background 0.2s ease;
}

[data-bs-theme=dark] .task-item-title {
color: #e0e0e0;
}

.task-item-title[contenteditable="true"] {
background: #fef3c7;
outline: 2px solid #fbbf24;
outline-offset: 2px;
cursor: text;
}

[data-bs-theme=dark] .task-item-title[contenteditable="true"] {
background: #78350f;
outline-color: #fbbf24;
}

.task-item-description {
font-size: 13px;
color: #6b7280;
line-height: 1.5;
padding: 4px;
border-radius: 4px;
transition: background 0.2s ease;
}

[data-bs-theme=dark] .task-item-description {
color: #9ca3af;
}

.task-item-description[contenteditable="true"] {
background: #fef3c7;
outline: 2px solid #fbbf24;
outline-offset: 2px;
cursor: text;
}

[data-bs-theme=dark] .task-item-description[contenteditable="true"] {
background: #78350f;
outline-color: #fbbf24;
}

.task-children {
margin-top: 10px;
}

.ai-task-actions {
display: flex;
flex-direction: column;
gap: 10px;
margin-top: 20px;
}

.ai-task-action-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 12px 20px;
border: none;
border-radius: 8px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
}

.ai-task-btn-accept {
background: #10b981;
color: white;
}

.ai-task-btn-accept:hover {
background: #059669;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ai-task-btn-regenerate {
background: #f3f4f6;
color: #374151;
border: 1px solid #d1d5db;
}

.ai-task-btn-regenerate:hover {
background: #e5e7eb;
}

[data-bs-theme=dark] .ai-task-btn-regenerate {
background: #374151;
color: #e5e7eb;
border-color: #4b5563;
}

[data-bs-theme=dark] .ai-task-btn-regenerate:hover {
background: #4b5563;
}

.ai-task-btn-edit {
background: #fff;
color: #10b981;
border: 2px solid #10b981;
}

.ai-task-btn-edit:hover {
background: #d1fae5;
}

.ai-task-btn-edit.editing {
background: #fbbf24;
color: white;
border-color: #fbbf24;
}

.ai-task-btn-edit.editing:hover {
background: #f59e0b;
border-color: #f59e0b;
}

.ai-task-success-final {
text-align: center;
padding: 60px 20px;
animation: messageSlideIn 0.3s ease;
}

.ai-task-success-icon {
color: #10b981;
margin-bottom: 20px;
}

.ai-task-success-final p {
margin: 0 0 8px 0;
font-size: 16px;
font-weight: 600;
color: #1f2937;
}

[data-bs-theme=dark] .ai-task-success-final p {
color: #e0e0e0;
}

.ai-task-success-final .text-muted {
color: #6b7280 !important;
}

@media (max-width: 480px) {
#ai-task-suggestion-widget {
  bottom: 10px;
  right: 70px;
}

.ai-task-box {
  width: calc(100vw - 20px);
  height: calc(100vh - 100px);
  bottom: 60px;
}

.ai-task-toggle {
  width: 50px;
  height: 50px;
}

.task-item.task-child {
  margin-left: 16px;
}
}
/* Pending Invoice Toast Styles */
.pending-invoice-toast {
  background: var(--bg);
  border-left: 4px solid var(--primary);
}

.pending-invoice-toast .toast-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  color: var(--primary);
}

.pending-invoice-toast .toast-body {
  background: var(--bg);
}

.pending-invoice-toast .invoice-amount {
  font-weight: 600;
  color: var(--text);
}

#sidebar {
  width: 280px;
  transition: all 0.3s ease;
  border-right: 1px solid #e0e0e0;
  background: white;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1040;
  overflow-y: auto;
  overflow-x: visible;
}

#sidebar.sidebar-mini {
  width: 70px;
}

#sidebar.sidebar-mini .menu-text {
  display: none !important;
}

#sidebar.sidebar-mini .nav-link {
  justify-content: center !important;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

#sidebar.sidebar-mini .nav-link i {
  margin-right: 0 !important;
  font-size: 1.25rem !important;
}

#sidebar.sidebar-mini #userInfo img {
  margin-right: 0 !important;
}

#sidebar.sidebar-mini .folder-submenu {
  display: none !important;
}

#sidebar.sidebar-mini .folder-actions {
  display: none !important;
}


#sidebar .nav-link,
#sidebar .folder-toggle {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

#sidebar .nav-link {
  color: var(--text);
}


#sidebar .nav-link > .material-symbols-rounded:first-child,
#sidebar .folder-toggle [data-folder-main="true"] > .material-symbols-rounded:first-child {
  margin-left: 0;
  min-width: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

#sidebar .nav-link:hover {
  background-color: rgb(var(--bs-secondary-rgb)) !important;
  color: var(--text);
}

#sidebar .nav-link.active {
  background-color: rgb(var(--bs-secondary-rgb)) !important;
  
}

#sidebar .nav-link.active i,
#sidebar .nav-link.active .material-symbols-rounded,
#sidebar .nav-link.active .menu-text {
  /* color: var(--bs-primary-active); */
}

#sidebar .folder-toggle:hover {
  background-color: rgb(var(--bs-secondary-rgb)) !important;
}

#sidebar .folder-toggle.active {
  background-color: rgb(var(--bs-secondary-rgb)) !important;
  color: var(--text);
}

#sidebar .folder-toggle.active i,
#sidebar .folder-toggle.active .material-symbols-rounded,
#sidebar .folder-toggle.active .menu-text {
  color: var(--text);
}

/* Account dropdown item active */
#sidebar #userInfo .dropdown-item.active.bg-light {
  background-color: rgb(var(--bs-secondary-rgb)) !important;
}

/* Main Content */
#mainContent {
  margin-left: 0;
  transition: margin-left 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
}

@media (min-width: 768px) {
  #mainContent {
      margin-left: 280px;
      width: calc(100% - 280px);
  }
}

#mainContent.compact {
  margin-left: 70px;
  width: calc(100% - 70px);
}
/* Board scroll container - allows both horizontal and vertical scroll */
[data-board-content-area] {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 66px);
  overflow: hidden;
  min-height: 0;
}

#boardMainContent {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#boardMainInner {
  flex: 1;
  min-height: 0;
}

.board-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0.25rem 0 1rem 0;
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  align-items: flex-start;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.board-scroll::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.board-scroll::-webkit-scrollbar-track { 
  border-radius: 4px;
}

.board-scroll::-webkit-scrollbar-thumb { 
  border-radius: 4px;
}

 

/* Kanban columns: equal width with a 250px minimum */
.board-column {
  flex: 0 0 250px;
  min-width: 300px;
  max-width: 350px;
}
 


.task-description img {
  display: none !important;
}

.task-description {
  white-space: pre-line;
}

/* Folder Styles */
#sidebar .nav.flex-column.position-relative {
  width: 100%;
  max-width: 100%;
}

#sidebarChildren {
  width: 100%;
  max-width: 100%;
}

.folder-submenu {
  border-left: 1px solid #3489c6;
  margin-left: 0.75rem;
  padding-left: 0.5rem;
  /* Smooth animation for open/close */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s ease-out, 
              transform 0.3s ease-out, 
              padding 0.3s ease-out;
  padding-top: 0;
  padding-bottom: 0;
  display: block !important; 
}

.folder-submenu.folder-submenu-open {
  max-height: 2000px;
  opacity: 1;
  transform: translateY(0);
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.folder-submenu.d-none {
  display: none !important; 
}

/* Float effect for child folders */
.folder-submenu > div {
  margin-bottom: 0.25rem;
}

.folder-submenu > div > .folder-toggle {
  position: relative;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, background-color 0.2s ease-out;
  border-radius: 8px;
}

.folder-submenu > div > .folder-toggle:hover {
  /* transform: translateX(4px); */
  box-shadow: 0 2px 8px rgba(52, 137, 198, 0.15);
  background-color: rgba(52, 137, 198, 0.05);
}

/* Chỉ child items trong submenu mới có đường ngang tree */
.folder-submenu .nav-link {
  position: relative;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

/* Đảm bảo folder-actions của child thẳng hàng với parent */
.folder-submenu .folder-toggle .folder-actions {
  /* right: 0.5rem; */
}

.folder-submenu .nav-link .folder-line {
  position: absolute;
  left: -10px;
  top: 50%;
  width: 0.75rem;
  border-top: 1px solid #3489c6;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

.folder-toggle {
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

/* Đảm bảo folder-actions thẳng hàng giữa cha và con */
.folder-toggle .folder-actions {
  margin-right: 0;
  padding-right: 0;
}

.folder-toggle .d-flex.align-items-center {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  flex-shrink: 1;
}

.folder-toggle .menu-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  flex: 1;
  min-width: 0;
}

.folder-actions {
  flex-shrink: 0;
  flex-grow: 0;
  gap: 0.125rem !important;
  padding: 0;
  margin-left: auto;
  width: fit-content;
  display: flex;
  align-items: center;
  position: relative;
  right: 0;
}

/* Ensure folder dropdown menu aligns to the right like kanban task menu */
#sidebar .folder-actions .dropdown-menu {
  left: auto !important;
  right: 0 !important;
}

/* Dropdown được append vào body để tràn ra ngoài sidebar */
.folder-dropdown-fixed {
  position: fixed !important;
  left: var(--dropdown-left, auto) !important;
  top: var(--dropdown-top, auto) !important;
  z-index: 9999 !important;
  max-width: none !important;
  width: max-content !important;
  min-width: 180px !important;
  transform: none !important;
}

.folder-actions i {
  font-size: 0.65rem !important;
  width: 0.875rem;
  height: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.folder-chevron {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(0deg);
}

/* Khi có class expanded, rotate 180deg */
.folder-chevron.expanded {
  transform: rotate(180deg);
}

/* Đảm bảo khi không có expanded, luôn rotate 0deg  */
.folder-toggle .folder-chevron:not(.expanded),
.folder-toggle.active .folder-chevron:not(.expanded) {
  transform: rotate(0deg);
}

/* Mobile Styles */
@media (max-width: 991px) {
  #sidebar {
      transform: translateX(-100%);
  }

  #sidebar.show {
      transform: translateX(0);
  }

  #mainContent {
      margin-left: 0 !important;
  }

  .mobile-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0,0,0,0.5);
      z-index: 1030;
      display: none;
  }

  .mobile-overlay.show {
      display: block;
  }

  .board-column {
      min-width: 250px;
  }
}

@media (max-width: 768px) {
  .board-column {
      min-width: 250px;
  }

  .d-md-none { display: block !important; }
  .d-md-flex { display: none !important; }
}

@media (max-width: 576px) {
  .board-column {
      min-width: 250px;
  }
}


.dropdown-submenu {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 0.25rem;
  z-index: 2000;
}

.notification-dropdown .notif-menu {
  min-width: 320px;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #eef0f3;
}

.notification-dropdown .notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #eef0f3;
}

.notification-dropdown .notif-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.notification-dropdown .notif-entry {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f3f5;
  transition: background 0.15s ease;
}

.notification-dropdown .notif-entry:last-child {
  border-bottom: 0;
}

.notification-dropdown .notif-entry:hover {
  background: #f6f8fb;
}

.notification-dropdown .notif-entry.success {
  background: #f1f8f3;
}

.notification-dropdown .notif-entry.warning {
  background: #faf3e6;
}

.notification-dropdown .notif-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.notification-dropdown .notif-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.notification-dropdown .notif-avatar.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5f3eb;
  color: #2f8d46;
  font-size: 16px;
}

.notification-dropdown .notif-avatar.icon.success {
  background: #e5f3eb;
  color: #2f8d46;
}

.notification-dropdown .notif-body {
  flex: 1;
  min-width: 0;
}

.notification-dropdown .notif-title {
  font-weight: 600;
  line-height: 1.3;
}

.notification-dropdown .notif-time {
  font-size: 12px;
  color: #6c757d;
}

.notification-dropdown .notif-footer {
  padding: 12px 16px;
  text-align: center;
  background: #f8fafc;
  border-top: 1px solid #eef0f3;
}

.dropdown-submenu > .dropdown-menu {
  display: block;
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 0.25rem;
}


.board-column.hoverpanel {
  outline: 2px dashed var(--bs-primary);
  outline-offset: 4px;
  box-shadow: 0 8px 24px rgba(13, 110, 253, 0.15);
  transition: box-shadow 120ms ease, outline-color 120ms ease;
}

.drop-placeholder {
  border: 1px dashed var(--bs-primary);
  border-radius: var(--bs-border-radius);
  height: 100px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.06), rgba(13, 110, 253, 0.12));
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.14);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.kanban-add-task-btn {
  color: var(--status-color, #0d6efd);
  border-color: var(--status-color, #0d6efd);
}

.kanban-status-text {
  color: var(--status-color, #6c757d);
}

.kanban-status-badge { 
  gap: 0.375rem;
  /* Tính màu từ 1 base color (Notion-like) */
  --status-dot-color: color-mix(in srgb, var(--status-color, #0d6efd) 100%, black 0%);
  --status-count-color: var(--status-dot-color);
  --status-text-color: color-mix(in srgb, var(--status-color, #0d6efd) 65%, black 35%);
  --status-badge-bg: color-mix(in srgb, var(--status-color, #0d6efd) 18%, white 82%);
  background-color: var(--status-bg, var(--status-badge-bg));
  border-radius: 9999px;
  padding: 0.175rem 0.55rem; 
}

.kanban-status-icon {
  font-size: 0.5rem;
  color: var(--status-dot-color); 
  font-variation-settings: 'FILL' 1;
}

.kanban-status-name { 
  color: var(--status-text-color);
  font-weight: 600;
}

.kanban-status-count {
  color: var(--status-count-color, var(--status-color, #0d6efd));
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.2;
}

/* Generic pill badge for type / priority (same logic as status) */
.kanban-tag-badge {
  --tag-base: var(--tag-color, #6b7280);
  --tag-bg:   color-mix(in srgb, var(--tag-base) 18%, white 82%);
  --tag-text: color-mix(in srgb, var(--tag-base) 70%, black 20%);

  background-color: var(--tag-bg);
  color: var(--tag-text); 
}

.kanban-task-actions {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.kanban-task-card:hover .kanban-task-actions {
  opacity: 1;
}

.kanban-task-edit-btn,
.kanban-task-menu-btn {
  transition: opacity 0.2s ease;
}

.kanban-task-menu {
  min-width: 100px;
  max-width: 200px;
  padding: 0.5rem 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.kanban-task-menu .dropdown-item {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  transition: background-color 0.15s ease;
}

.kanban-task-menu .dropdown-item:hover {
  background-color: #f5f5f5;
}

.kanban-task-menu .dropdown-item i.fa-chevron-right {
  margin-left: auto;
  font-size: 0.75rem;
  color: #999;
}

.kanban-task-menu .dropdown-item span.text-muted {
  margin-left: auto;
  font-size: 0.75rem;
}

.kanban-task-menu .dropdown-header {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  text-transform: none;
  color: #333;
}

.kanban-task-menu input.form-control {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.875rem;
}

.kanban-task-menu input.form-control:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(52, 137, 198, 0.1);
}

.list-group-item {
  position: relative;
  display: block;
  padding: var(--bs-list-group-item-padding-y) var(--bs-list-group-item-padding-x);
  color: var(--bs-list-group-color);
  text-decoration: none;
  background-color: var(--bs-list-group-bg);
  border: none;
}


.offcanvas {
  z-index: 4000 !important;
}

.offcanvas-backdrop {
  z-index: 3990 !important;
}

.offcanvas-body {
  padding: 0 !important;
}

label:has(+ input[required])::after {
  content: " *";
  color: red;
}