@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f1f2f4;
    --bg-tertiary: #ebecf0;
    --bg-modal: #ffffff;
    --text-primary: #172b4d;
    --text-secondary: #5e6c84;
    --text-muted: #8c9bab;
    --border-color: #091e4221;
    --border-hover: #091e424f;
    --shadow-sm: 0 1px 1px #091e4240, 0 0 1px #091e424f;
    --shadow-md: 0 8px 16px -4px #091e4221, 0 0 1px #091e424f;
    --shadow-lg: 0 12px 24px -6px #091e4221, 0 0 1px #091e424f;
    --card-bg: #ffffff;
    --input-bg: #fafbfc;
    --blue: #0079bf;
    --green: #61bd4f;
    --yellow: #f2d600;
    --orange: #ff9f1a;
    --red: #eb5a46;
    --purple: #c377e0;
    --pink: #ff80ce;
    --sky: #00c2e0;
    --lime: #51e898;
    --gray: #b3bac5;
}

[data-theme="dark"] {
    --bg-primary: #1d2125;
    --bg-secondary: #22272b;
    --bg-tertiary: #282e33;
    --bg-modal: #282e33;
    --text-primary: #b6c2cf;
    --text-secondary: #9fadbc;
    --text-muted: #8c9bab;
    --border-color: #38414a;
    --border-hover: #4c5863;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    --card-bg: #22272b;
    --input-bg: #22272b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px; /* espaço entre a imagem e o texto */
  }

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--blue), var(--green));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.logo-stack {
    position: relative;
    width: 32px;   /* ajuste se quiser maior/menor */
    height: 32px;  /* mantém o espaço fixo, sem pular layout */
    display: inline-block;
  }

.logo-img {
    position: absolute;
    inset: 0;                 /* top/right/bottom/left = 0 */
    width: 100%;
    height: 100%;
    object-fit: contain;      /* mantém proporção */
    transition: opacity .25s ease-in-out;
    user-select: none;
    pointer-events: none;     /* não bloqueia cliques na área */
  }
  
  /* por padrão, tema claro visível */
  .logo-dark  { opacity: 1; }
  .logo-light { opacity: 0; }
  
  /* quando tema escuro, inverte */
  [data-theme="dark"]  .logo-dark { opacity: 0; }
  [data-theme="dark"]  .logo-light { opacity: 1; }


.board-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
}

.search-input {
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    width: 240px;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--blue);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.theme-toggle {
    padding: 8px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu:hover {
    background: var(--bg-tertiary);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.filter-panel {
    position: fixed;
    top: 60px;
    right: -380px;
    width: 360px;
    height: calc(100vh - 60px);
    background: var(--bg-modal);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 500;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.filter-panel.show {
    right: 0;
}

.filter-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.filter-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.filter-panel-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.filter-panel-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.filter-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.filter-search {
    margin-bottom: 16px;
}

.filter-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.filter-search-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

.filter-labels-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-label-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.filter-label-item:hover {
    background: var(--border-color);
    transform: translateX(4px);
}

.filter-label-item.active {
    border-color: var(--blue);
    background: rgba(0, 121, 191, 0.1);
}

.filter-label-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--blue);
}

.filter-label-color {
    flex: 1;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.filter-label-count {
    background: var(--bg-primary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.filter-actions {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.active-filters {
    padding: 12px 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.active-filters.show {
    display: flex;
}

.active-filters-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-right: 4px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-chip-remove {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    line-height: 1;
    transition: all 0.2s;
}

.filter-chip-remove:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.clear-all-filters {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-all-filters:hover {
    background: var(--red);
    color: white;
    border-color: var(--red);
}

.board-container {
    padding: 16px;
    height: calc(100vh - 60px);
    overflow-x: auto;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.board {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 20px;
    overflow-x: auto;
  }
  
  /* colunas (modo claro e escuro adaptativos) */
  .column {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 16px;
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
    transition: all 0.25s ease;
    border: 1px solid var(--border-color);
  }
  
  .column:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  }
  
  .column-header {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

.column-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 20px;
    flex: 1;
}

.column-count {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.column-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.column-menu-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.column-menu {
    position: relative;
}

.column-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 100;
    margin-top: 4px;
}

.column-dropdown.show {
    display: block;
}

.column-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-dropdown-item:hover {
    background: var(--bg-tertiary);
}

.column-dropdown-item.danger {
    color: var(--red);
}

.column-dropdown-item.danger:hover {
    background: rgba(235, 90, 70, 0.1);
}

.cards-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0;
    max-height: calc(100% - 100px);
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    scroll-behavior: smooth;
}

.cards-list::-webkit-scrollbar {
    width: 8px;
}

.cards-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.cards-list::-webkit-scrollbar-track {
    background: transparent;
}

.card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 12px 14px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid var(--border-color);
  }
  
  .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.18);
    border-color: rgba(100,100,100,0.3);
  }
  
  /* título da tarefa */
  .card-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.4;
  }
  
  /* descrição/resumo */
  .card-description {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
  }
  
  /* sombra e gradiente adaptativos */
  :root.light {
    --bg-primary: #ffffff;
    --bg-tertiary: #f9fafb;
    --border-color: rgba(0,0,0,0.08);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.08);
  }
  
  :root.dark {
    --bg-primary: #1f2937;
    --bg-tertiary: #2b3543;
    --border-color: rgba(255,255,255,0.08);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.35);
  }
  
  /* efeitos sutis nos modos */
  .light .column {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  }
  .dark .column {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
  }
  
  /* cards em modo escuro ganham brilho leve */
  .dark .card {
    background: #2b3543;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.06);
  }
  .dark .card:hover {
    box-shadow: 0 6px 14px rgba(0,0,0,0.55);
  }
  
  /* cor de cabeçalhos das colunas */
  .column-header-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .3px;
  }

.label {
    height: 8px;
    width: 40px;
    border-radius: 3px;
    transition: all 0.1s ease;
    cursor: pointer;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}

.label-text {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 12px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
    padding: 6px 8px;
    background: inherit;
    border-radius: 3px;
    line-height: 16px;
}

.label:hover {
    width: auto;
    height: auto;
    min-width: 40px;
    z-index: 1000;
    position: relative;
}

.label:hover .label-text {
    opacity: 1;
    position: static;
}

.label-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    margin-right: 4px;
    margin-bottom: 4px;
    cursor: help;
    position: relative;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.label-tag::after {
    content: attr(data-full-text);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 1000;
}

.label-tag:hover::after {
    opacity: 1;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.badge {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 2px 4px;
    border-radius: 3px;
    background: transparent;
}

.badge:hover {
    background: var(--bg-tertiary);
}

.badge-timer {
    background: transparent;
    color: var(--text-secondary);
    padding: 0;
    border-radius: 0;
    font-weight: 400;
}

.badge-images {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-members {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 500;
    border: 2px solid var(--card-bg);
    margin-left: -4px;
}

.member-avatar:first-child {
    margin-left: 0;
}

.add-card-btn {
    margin: 8px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    width: calc(100% - 16px);
}

.add-card-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.add-card-form {
    display: none;
    padding: 8px;
    gap: 8px;
    flex-direction: column;
}

.add-card-form.show {
    display: flex;
}

.add-card-input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
    outline: none;
}

.add-card-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

.add-card-actions {
    display: flex;
    gap: 8px;
}

.add-column-btn {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    width: 272px;
    flex-shrink: 0;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    border: none;
}

.add-column-btn:hover {
    background: rgba(0, 0, 0, 0.25);
}

.add-column-form {
    background: var(--bg-tertiary);
    border-radius: 8px;
    width: 272px;
    flex-shrink: 0;
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 8px;
}

.add-column-form.show {
    display: flex;
}

.add-column-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.add-column-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

.add-column-actions {
    display: flex;
    gap: 8px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 0;
    overflow-y: auto;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--bg-modal);
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    box-shadow: var(--shadow-lg);
    margin: auto;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.modal-icon {
    font-size: 20px;
    margin-top: 2px;
}

.modal-title-content {
    flex: 1;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-modal {
    padding: 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all 0.2s;
}

.close-modal:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.modal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-width: 0;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.modal-sidebar {
    width: 320px;
    border-left: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-section {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.section-icon {
    font-size: 18px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item.full {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
}

.info-input,
.info-textarea,
.info-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}

.info-input:focus,
.info-textarea:focus,
.info-select:focus {
    border-color: var(--blue);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

.info-textarea {
    resize: vertical;
    min-height: 80px;
}

.members-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.member-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.member-chip-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
}

.member-chip-remove {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s;
}

.member-chip-remove:hover {
    color: var(--red);
}

.add-member-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.add-member-input {
    flex: 0 1 auto;
    max-width: 280px;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}


.add-member-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

.timer-section {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.timer-display {
    flex: 1;
}

.timer-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 8px;
}

.timer-users {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.timer-user-chip {
    background: var(--bg-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.timer-controls {
    display: flex;
    gap: 8px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--blue);
    color: white;
}

.btn-primary:hover {
    background: #026aa7;
}

.btn-success {
    background: var(--green);
    color: white;
}

.btn-success:hover {
    background: #519839;
}

.btn-warning {
    background: var(--orange);
    color: white;
}

.btn-warning:hover {
    background: #e68900;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--red);
    color: white;
}

.btn-danger:hover {
    background: #cf513d;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    gap: 10px;
}

.activity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.activity-user {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.activity-action {
    color: var(--text-secondary);
    font-size: 13px;
}

.activity-time {
    color: var(--text-muted);
    font-size: 11px;
}

.activity-text {
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    background: var(--bg-primary);
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 4px;
    word-wrap: break-word;
}

.comment-form {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.comment-input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
    width: 100%;
    outline: none;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.comment-input:focus {
    border-color: var(--blue);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

.comment-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.comment-actions {
    display: flex;
    gap: 8px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all 0.2s;
}

.image-item:hover {
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.image-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-item:hover .image-actions {
    opacity: 1;
}

.image-btn {
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    color: var(--text-primary);
}

.image-btn:hover {
    transform: scale(1.1);
}

.image-btn.delete {
    background: var(--red);
    color: white;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 24px;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all 0.2s;

    /* NOVO: centralizar tudo */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px; /* espaçamento entre as linhas */
    text-align: center;
}

.upload-area:hover {
    border-color: var(--blue);
    background: var(--bg-primary);
}

.upload-area.dragover {
    border-color: var(--green);
    background: rgba(97, 189, 79, 0.1);
}


.upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.upload-text {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.upload-subtext {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.modal-actions {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.labels-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.labels-modal.show {
    display: flex;
}

.labels-modal-content {
    background: var(--bg-modal);
    border-radius: 12px;
    width: 90%;
    max-width: 320px;
    box-shadow: var(--shadow-lg);
}

.labels-modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.labels-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.labels-modal-close {
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.labels-modal-close:hover {
    background: var(--bg-tertiary);
}

.labels-modal-body {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.label-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 12px;
    outline: none;
}

.label-search:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

.labels-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.label-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all 0.2s;
}

.label-item:hover {
    background: var(--border-color);
}

.label-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.label-color {
    flex: 1;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: white;
    font-size: 13px;
    font-weight: 500;
}

.label-edit-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.label-edit-btn:hover {
    background: var(--bg-primary);
}

.create-label-btn {
    width: 100%;
    padding: 10px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.create-label-btn:hover {
    background: var(--border-color);
}

.label-form {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 12px;
}

.label-form.show {
    display: flex;
}

.label-form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.label-form-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

.label-colors-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.color-option {
    width: 100%;
    height: 32px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-modal);
}

.label-form-actions {
    display: flex;
    gap: 8px;
}

/* Toast Notifications - Melhorado e Dinâmico */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-modal);
    border-left: 4px solid var(--blue);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    display: none;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    max-width: 420px;
    z-index: 2000;
    backdrop-filter: blur(10px);
    animation: slideInBounce 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transition: all 0.3s ease;
}

@keyframes slideInBounce {
    0% {
        transform: translateX(120%) scale(0.8);
        opacity: 0;
    }

    70% {
        transform: translateX(-10px) scale(1.02);
    }

    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes slideOut {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }
}

.toast.show {
    display: flex;
}

.toast.hide {
    animation: slideOut 0.3s ease forwards;
}

.toast.toast-success {
    border-left-color: var(--green);
}

.toast.toast-error {
    border-left-color: var(--red);
}

.toast.toast-warning {
    border-left-color: var(--orange);
}

.toast.toast-info {
    border-left-color: var(--blue);
}

.toast-icon {
    font-size: 24px;
    line-height: 1;
    animation: iconPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s backwards;
}

@keyframes iconPop {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s;
    opacity: 0.6;
}

.toast-close:hover {
    opacity: 1;
    background: var(--bg-tertiary);
    transform: rotate(90deg);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--green));
    border-radius: 0 0 0 12px;
    animation: progressBar 3s linear forwards;
}

@keyframes progressBar {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.image-modal.show {
    display: flex;
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.image-modal img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.image-modal-actions {
    padding: 16px;
    display: flex;
    gap: 12px;
    justify-content: center;
    background: white;
}

.close-image-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-image-modal:hover {
    background: var(--red);
    color: white;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .board {
        flex-direction: column;
    }

    .column {
        width: 100%;
        max-height: 420px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        width: 95%;
        max-width: 95vw;
    }

    .modal-content-wrapper {
        flex-direction: column;
    }

    .modal-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-color);
        max-height: 300px;
    }

    .search-input {
        width: 180px;
    }

    .filter-panel {
        width: 100%;
        right: -100%;
    }

    .filter-panel.show {
        right: 0;
    }

    .toast {
        right: 12px;
        bottom: 12px;
        min-width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
    }
}

/* ======================================================================
   BOTÕES DE CORES
   ====================================================================== */

   .color-option {
    width: 100%;
    height: 40px;
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.color-option.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* ======================================================================
   MENU DA COLUNA
   ====================================================================== */

.column-menu {
    position: relative;
}

.column-menu-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.column-menu-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.column-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 180px;
    z-index: 1000;
    margin-top: 4px;
}

.menu-item {
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item:hover {
    background: var(--bg-tertiary);
}

.menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.menu-item.danger {
    color: #ef4444;
}

.menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ======================================================================
   RODAPÉ DA COLUNA (Botão Adicionar Card)
   ====================================================================== */

.column-footer {
    padding: 12px;
    border-top: 1px solid var(--border-color);
}

.add-card-btn {
    width: 100%;
    padding: 10px;
    background: none;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-card-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* ======================================================================
   AJUSTES NA COLUNA PARA INCLUIR O RODAPÉ
   ====================================================================== */

.column {
    display: flex;
    flex-direction: column;
    min-width: 320px;
    max-width: 320px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: calc(100vh - 180px);
}

.column-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 100px;
}

/* ======================================================================
   MODAL DE CRIAÇÃO (se necessário ajustes)
   ====================================================================== */

.modal-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.add-member-input,
.comment-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.add-member-input:focus,
.comment-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

select.add-member-input {
    cursor: pointer;
}

input[type="date"].add-member-input {
    cursor: pointer;
}

input[type="number"].add-member-input {
    text-align: right;
}

/* ======================================================================
   RESPONSIVIDADE
   ====================================================================== */

@media (max-width: 768px) {
    .column {
        min-width: 280px;
        max-width: 280px;
    }
    
    .column-menu-dropdown {
        right: auto;
        left: 0;
    }
}

/* ======================================================================
   MODO ESCURO - Ajustes adicionais
   ====================================================================== */

[data-theme="dark"] .color-option {
    border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .color-option:hover {
    box-shadow: 0 4px 12px rgba(255,255,255,0.2);
}

[data-theme="dark"] .color-option.selected {
    border-color: #fff;
}

[data-theme="dark"] .column-menu-btn:hover {
    background: rgba(255,255,255,0.1);
}

[data-theme="dark"] .menu-item:hover {
    background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .add-card-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* ======================================================================
   ANIMAÇÕES
   ====================================================================== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.column-menu-dropdown {
    animation: slideDown 0.2s ease;
}

/* ======================================================================
   BOTÃO DE EXCLUIR NO MODAL DA TAREFA
   ====================================================================== */

.btn.btn-danger {
    background: #ef4444;
    color: white;
}

.btn.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ====================================================================== */
/* ADICIONADO - ESTILOS PARA NOVAS FUNCIONALIDADES */
/* ====================================================================== */

/* Menu de Coluna */
.column-menu {
    position: relative;
}

.column-menu-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.column-menu-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.column-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    min-width: 180px;
    z-index: 1000;
    margin-top: 4px;
}

.menu-item {
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item:hover {
    background: var(--bg-tertiary);
}

.menu-item:first-child {
    border-radius: 8px 8px 0 0;
}

.menu-item:last-child {
    border-radius: 0 0 8px 8px;
}

.menu-item.danger {
    color: #ef4444;
}

.menu-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Rodapé da Coluna */
.column-footer {
    padding: 12px;
    border-top: 1px solid var(--border-color);
}

.add-card-btn {
    width: 100%;
    padding: 10px;
    background: none;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-card-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* Seletor de Cores */
.color-option, .label-color-btn {
    width: 100%;
    height: 40px;
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.color-option:hover, .label-color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.color-option.selected, .label-color-btn.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* Painel de Filtros */
.filter-panel {
    position: fixed;
    top: 70px;
    right: -350px;
    width: 320px;
    height: calc(100vh - 70px);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.filter-panel.active {
    right: 0;
}

.filter-panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-panel-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.filter-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.filter-panel-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.filter-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.filter-search {
    margin-bottom: 16px;
}

.filter-search-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

.filter-labels-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-label-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-label-item:hover {
    background: var(--bg-tertiary);
}

.filter-label-item input[type="checkbox"] {
    cursor: pointer;
}

.filter-label-item label {
    flex: 1;
    cursor: pointer;
    display: flex;
}

.filter-actions {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* Filtros Ativos */
.active-filters {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.filter-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: 16px;
}

.filter-chip button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
}

.filter-chip button:hover {
    color: var(--text-primary);
}

/* Modal de Etiquetas */
.labels-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.labels-modal-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.labels-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.labels-modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.labels-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: all 0.2s;
}

.labels-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.labels-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.label-search {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.label-form {
    display: none;
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.label-form-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.label-colors-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.label-form-actions {
    display: flex;
    gap: 8px;
}

.labels-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.label-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.label-item:hover {
    background: var(--bg-hover);
}

.label-item-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.label-check {
    color: var(--success-color);
    font-size: 18px;
    font-weight: bold;
}

.label-item-actions {
    display: flex;
    gap: 4px;
}

.label-item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.2s;
}

.label-item-actions button:hover {
    background: var(--bg-secondary);
}

.create-label-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    /* FORÇAR COR PRETA NO MODO CLARO */
    color: #172b4d !important;
}

.create-label-btn:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

/* Modo Escuro - Cor Branca */
[data-theme="dark"] .create-label-btn {
    color: #ffffff !important;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .create-label-btn:hover {
    background: var(--border-hover);
}

/* Ajustes na Coluna */
.column {
    display: flex;
    flex-direction: column;
    min-width: 320px;
    max-width: 320px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: calc(100vh - 180px);
}

.column-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 100px;
}

.column-body.cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Botão de Excluir */
.btn.btn-danger {
    background: #ef4444;
    color: white;
}

.btn.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Modo Escuro */
[data-theme="dark"] .color-option,
[data-theme="dark"] .label-color-btn {
    border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .color-option:hover,
[data-theme="dark"] .label-color-btn:hover {
    box-shadow: 0 4px 12px rgba(255,255,255,0.2);
}

[data-theme="dark"] .color-option.selected,
[data-theme="dark"] .label-color-btn.selected {
    border-color: #fff;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.column-menu-dropdown {
    animation: slideDown 0.2s ease;
}
/* ADICIONE ESTE CSS NO FINAL DO SEU CRM.css */

/* Esconder texto da etiqueta apenas nos cards */
.card .label .label-text {
    display: none;
}

/* Mostrar texto ao passar o mouse no card */
.card:hover .label .label-text {
    display: inline;
}

/* Sempre mostrar texto completo em outros lugares */
.modal-section .label .label-text,
.filter-label-item .label .label-text,
.label-item .label .label-text,
.filter-chip .label .label-text {
    display: inline !important;
}
/* ======================================================================
   ADICIONE ESTE CSS NO FINAL DO SEU CRM.css
   ====================================================================== */

/* Spinner de Loading para Botões */
@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Melhorias nos Botões de Cor */
.color-option {
    width: 100%;
    height: 45px;
    border: 3px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-option:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.color-option.selected {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px var(--blue), 0 4px 12px rgba(0,0,0,0.3);
    transform: scale(1.05);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Ajustes para Modo Escuro */
[data-theme="dark"] .color-option {
    border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .color-option:hover {
    box-shadow: 0 4px 12px rgba(255,255,255,0.2);
}

[data-theme="dark"] .color-option.selected {
    border-color: #fff;
}

/* Animação para Modal */
.modal-overlay.show {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay.show .modal {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Preview de Cor no Modal */
#previewColorBox {
    transition: background 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Melhorias no Input */
.add-member-input:focus,
.comment-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

/* Contador de Tarefas na Coluna */
.column-count {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    display: inline-block;
}

/* Ajustes no Menu da Coluna */
.column-menu-dropdown {
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Melhorias nas Etiquetas do Card */
.card .label {
    transition: all 0.2s ease;
}

.card:hover .label {
    opacity: 1;
}

/* Ajustes para Responsividade */
@media (max-width: 768px) {
    .color-option {
        height: 40px;
    }
    
    #previewColorBox {
        width: 35px;
        height: 35px;
    }
}

/* Estados de Loading */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Transições Suaves */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

button,
.btn {
    transition: all 0.2s ease;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Melhorias no Modal */
.modal-subtitle strong {
    color: var(--blue);
    font-weight: 600;
}

/* Ajustes na Grade de Informações */
.info-grid .info-item {
    animation: fadeInUp 0.3s ease;
    animation-fill-mode: backwards;
}

.info-grid .info-item:nth-child(1) { animation-delay: 0.05s; }
.info-grid .info-item:nth-child(2) { animation-delay: 0.1s; }
.info-grid .info-item:nth-child(3) { animation-delay: 0.15s; }
.info-grid .info-item:nth-child(4) { animation-delay: 0.2s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================================================
   ESTILOS ADICIONAIS - TIMER DINÂMICO E INFORMAÇÕES DO CARD
   Adicione este CSS ao final do seu CRM.css existente
   ============================================================================= */

/* Timer no Card - Footer */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
}

.card-created-by {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

/* Timer Container no Card */
.card-timer-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.card-timer.timer-active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    animation: timerPulse 2s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.02);
    }
}

/* Pulso de Atividade */
.timer-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* Usuários Ativos no Card */
.card-active-users {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.card-active-user {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    font-size: 10px;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.user-avatar-small {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.user-working-badge {
    color: #22c55e;
    font-size: 10px;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Timer no Modal */
.timer-section {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timer-display {
    flex: 1;
}

.timer-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 12px;
    letter-spacing: 2px;
    text-align: center;
}

/* Usuários com Timer Ativo no Modal */
.timer-users {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.timer-user-chip {
    background: var(--bg-primary);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(34, 197, 94, 0.3);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.user-working-indicator {
    color: #22c55e;
    font-size: 14px;
    animation: blink 1.5s ease-in-out infinite;
}

.user-timer-duration {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

/* Controles do Timer */
.timer-controls {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.timer-controls .btn {
    min-width: 120px;
    font-weight: 600;
}

/* Bloco de Comentário Inline */
#inlineCommentBlock {
    margin-top: 16px;
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#inlineCommentBlock .comment-input {
    width: 100%;
    min-height: 80px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

#inlineCommentBlock .comment-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

#inlineCommentBlock .comment-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

/* Informações do Card - Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 8px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item.full {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Animação de Spinner para Botões de Loading */
@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Card Hover Effects */
.card {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card:hover .card-timer {
    transform: scale(1.05);
}

/* Badges e Indicadores */
.badge-timer {
    background: transparent;
    color: var(--text-secondary);
    padding: 0;
    border-radius: 0;
    font-weight: 400;
}

/* Responsividade para Timer */
@media (max-width: 768px) {
    .timer-value {
        font-size: 28px;
    }
    
    .card-timer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .card-active-users {
        margin-top: 6px;
    }
    
    .timer-user-chip {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .timer-controls {
        flex-direction: column;
    }
    
    .timer-controls .btn {
        width: 100%;
    }
}

/* Modo Escuro - Ajustes para Timer */
[data-theme="dark"] .card-timer {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

[data-theme="dark"] .card-timer.timer-active {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

[data-theme="dark"] .timer-pulse {
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

[data-theme="dark"] .card-active-user {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
}

[data-theme="dark"] .user-avatar-small {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}

[data-theme="dark"] .user-working-badge {
    color: #4ade80;
}

[data-theme="dark"] .timer-user-chip {
    background: var(--bg-secondary);
    border-color: rgba(34, 197, 94, 0.4);
}

[data-theme="dark"] .user-working-indicator {
    color: #4ade80;
}

/* Melhorias Visuais Gerais */
.card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.label {
    height: 8px;
    width: 40px;
    border-radius: 3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}

.label:hover {
    width: auto;
    height: auto;
    min-width: 40px;
    z-index: 1000;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.label-text {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 12px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
    padding: 6px 8px;
    background: inherit;
    border-radius: 3px;
    line-height: 16px;
}

.label:hover .label-text {
    opacity: 1;
    position: static;
}

/* Animações Suaves */
.modal-overlay.show {
    animation: fadeIn 0.2s ease;
}

.modal {
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Scrollbar Personalizada */
.timer-users::-webkit-scrollbar,
.card-active-users::-webkit-scrollbar {
    height: 6px;
}

.timer-users::-webkit-scrollbar-thumb,
.card-active-users::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.timer-users::-webkit-scrollbar-track,
.card-active-users::-webkit-scrollbar-track {
    background: transparent;
}

/* Estados de Botão */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: var(--blue);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: #026aa7;
}

.btn-warning {
    background: var(--orange);
    color: white;
}

.btn-warning:hover {
    background: #e68900;
}

/* Transições Globais */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

button,
.btn,
.card,
.label {
    transition: all 0.2s ease;
}

/* Melhorias de Acessibilidade */
.card:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

/* Indicadores de Status */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.status-indicator.paused {
    background: var(--orange);
}

.status-indicator.stopped {
    background: var(--text-muted);
}

/* Tooltips Melhorados */
[title] {
    position: relative;
}

/* Grid Responsivo */
@media (max-width: 1024px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Animação de Entrada para Cards */
.card {
    animation: cardFadeIn 0.3s ease backwards;
}

.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Performance Optimization */
.card,
.timer-pulse,
.user-working-badge {
    will-change: transform, opacity;
}

/* Print Styles */
@media print {
    .timer-pulse,
    .user-working-badge {
        animation: none;
    }
    
    .card-timer.timer-active {
        background: #e5e7eb;
        color: #000;
    }
}


.logout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    backdrop-filter: blur(6px);
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.logout-overlay.show {
    opacity: 1;
}

.logout-box {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 360px;
    width: 90%;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.logout-overlay.show .logout-box {
    transform: translateY(0);
}

.logout-icon {
    font-size: 40px;
    margin-bottom: 12px;
    animation: floatIcon 2.5s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.logout-box h2 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 20px;
}

.logout-box p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.logout-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.logout-actions button {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-cancel:hover {
    background: var(--border-color);
}

.btn-confirm {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #15803d, #16a34a);
}

.confirm-overlay{
    position:fixed; inset:0;
    background:rgba(0,0,0,.6); backdrop-filter:blur(6px);
    display:flex; align-items:center; justify-content:center;
    opacity:0; transition:opacity .2s ease; z-index:9999;
  }
  .confirm-overlay.show{ opacity:1; }
  
  .confirm-box{
    background:var(--bg-primary);
    border:1px solid var(--border-color);
    border-radius:16px; box-shadow:var(--shadow-lg);
    width:min(520px,92vw); padding:28px 32px; text-align:center;
    transform:translateY(10px); transition:transform .2s ease;
  }
  .confirm-overlay.show .confirm-box{ transform:translateY(0); }
  
  .confirm-icon{ font-size:38px; margin-bottom:10px; }
  .confirm-title{ color:var(--text-primary); font-weight:800; font-size:20px; margin:4px 0 8px; }
  .confirm-text{ color:var(--text-secondary); font-size:14px; line-height:1.5; margin-bottom:6px; }
  .confirm-warning{ color:#ef4444; font-size:12px; font-weight:700; letter-spacing:.2px; }
  
  .confirm-actions{ display:flex; justify-content:center; gap:10px; margin-top:18px; }
  .confirm-actions .btn-cancel,
  .confirm-actions .btn-confirm{
    padding:10px 16px; border:none; border-radius:10px; font-weight:700; cursor:pointer; transition:.15s;
  }
  .confirm-actions .btn-cancel{ background:var(--bg-tertiary); color:var(--text-primary); }
  .confirm-actions .btn-cancel:hover{ background:var(--border-color); }
  
  .confirm-actions .btn-confirm{
    color:#fff; background:linear-gradient(135deg,#dc2626,#ef4444);
    box-shadow:0 6px 14px rgba(239,68,68,.25);
  }
  .confirm-actions .btn-confirm:hover{ background:linear-gradient(135deg,#b91c1c,#dc2626); }
  

/* ================================
   Subtarefas
   ================================ */
.subtasks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.subtask-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
}
.subtask-flag {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    border: 2px solid currentColor;
}
.subtask-title {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
}
.subtask-title.done {
    text-decoration: line-through;
    opacity: 0.7;
}
.subtask-assignee {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    font-size: 12px;
    color: var(--text-secondary);
}
.subtask-timer {
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    min-width: 72px;
    text-align: right;
}
.subtask-actions .btn {
    margin-left: 6px;
}

/* Activity tag for subtask-linked comments */
.activity-item.subtask-linked {
    border-left: 4px solid var(--border-color);
    padding-left: 10px;
}
.activity-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid currentColor;
    font-size: 11px;
    margin-left: 8px;
}
.add-subtask-form {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

/* hide any residual subtask timers */
.subtask-timer{display:none !important;}


/* Labels no topo do modal */
.modal-labels-top {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px 0;
}

/* Colunas Fixas - Destaque Visual */
.column-header .column-title span[style*="font-size: 12px"] {
    animation: lockPulse 2s ease-in-out infinite;
}

@keyframes lockPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Estilo especial para colunas fixas */
.column:has(.column-title span[style*="font-size: 12px"]) {
    border: 2px solid rgba(34, 197, 94, 0.3);
    background: linear-gradient(180deg, 
        rgba(34, 197, 94, 0.05) 0%, 
        var(--bg-primary) 100%);
}

/* Menu desabilitado para colunas fixas */
.menu-item[disabled] {
    pointer-events: none;
    user-select: none;
}

/* ===== FLAG DE PRIORIDADE NO CARD ===== */
.card {
    position: relative;
}

.card-priority-flag {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
    transition: transform 0.2s ease;
}

.card-priority-flag:hover {
    transform: scale(1.1);
}

/* ===== SEÇÕES DE FILTROS ===== */
.filter-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== CHECKBOX DE FILTROS ===== */
.filter-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.filter-checkbox-item:hover {
    background: var(--bg-tertiary);
}

.filter-checkbox-item input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin: 0;
}

.filter-checkbox-label {
    flex: 1;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-count {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.priority-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

/* ===== CHIPS DE FILTROS ATIVOS ===== */
.active-filters {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.active-filters.show {
    display: flex;
}

.active-filters-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-chip-remove {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.filter-chip-remove:hover {
    background: rgba(255, 255, 255, 0.5);
}

.clear-all-filters {
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-all-filters:hover {
    background: var(--bg-secondary);
    border-color: var(--border-hover);
}

/* ===== PAINEL DE FILTROS ===== */
.filter-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 380px;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.filter-panel.show {
    right: 0;
}

.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-panel-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.filter-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.filter-search {
    margin-bottom: 20px;
}

.filter-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.filter-search-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

.filter-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .filter-panel {
        width: 100%;
        right: -100%;
    }
    
    .card-priority-flag {
        width: 24px;
        height: 24px;
        font-size: 12px;
        top: 6px;
        right: 6px;
    }
}

/* ===== MODO ESCURO ===== */
[data-theme="dark"] .filter-checkbox-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .filter-count {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .clear-all-filters {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .clear-all-filters:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== INDICADOR DE TIMERS ===== */
.timer-indicator {
    position: relative;
    margin-left: 20px;
}

.timer-indicator-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.timer-indicator-button:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===== ÍCONE DO INDICADOR ===== */
.timer-indicator-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f3f4f6;
    border-radius: 8px;
    color: #6b7280;
}

[data-theme="dark"] .timer-indicator-icon {
    background: rgba(255,255,255,0.1);
    color: #9ca3af;
}

/* ===== ANIMAÇÃO DE PULSO ===== */
.timer-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #ef4444;
    border-radius: 8px;
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    opacity: 0;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* ===== INDICADOR ATIVO ===== */
.timer-indicator.has-active-timers .timer-indicator-button {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
    animation: glow 2s ease-in-out infinite;
}

[data-theme="dark"] .timer-indicator.has-active-timers .timer-indicator-button {
    background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
    border-color: #f59e0b;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(251, 191, 36, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.8), 0 0 30px rgba(251, 191, 36, 0.4);
    }
}

.timer-indicator.has-active-timers .timer-indicator-icon {
    background: #fbbf24;
    color: white;
}

.timer-indicator.has-active-timers .timer-pulse-ring {
    border-color: #ef4444;
    opacity: 1;
}

/* ===== CONTEÚDO DO INDICADOR ===== */
.timer-indicator-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timer-indicator-count {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.timer-indicator.has-active-timers .timer-indicator-count {
    color: #92400e;
}

[data-theme="dark"] .timer-indicator.has-active-timers .timer-indicator-count {
    color: #fbbf24;
}

.timer-indicator-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== SETA DO INDICADOR ===== */
.timer-indicator-arrow {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.timer-indicator.panel-open .timer-indicator-arrow {
    transform: rotate(180deg);
}

/* ===== PAINEL DE TIMERS ===== */
.timer-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 450px;
    max-height: 600px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.timer-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== HEADER DO PAINEL ===== */
.timer-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 16px 16px 0 0;
}

[data-theme="dark"] .timer-panel-header {
    background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
}

.timer-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #78350f;
}

[data-theme="dark"] .timer-panel-title {
    color: #fbbf24;
}

.timer-panel-title svg {
    stroke: currentColor;
    stroke-width: 2;
}

.timer-panel-close {
    background: rgba(255,255,255,0.3);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #78350f;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-theme="dark"] .timer-panel-close {
    color: #fbbf24;
}

.timer-panel-close:hover {
    background: rgba(255,255,255,0.5);
    transform: scale(1.1);
}

/* ===== ALERTA DO PAINEL ===== */
.timer-panel-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 16px 20px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
    border-radius: 12px;
    animation: alert-pulse 2s ease-in-out infinite;
}

[data-theme="dark"] .timer-panel-alert {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    border-color: #dc2626;
}

@keyframes alert-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.alert-icon {
    font-size: 24px;
    line-height: 1;
}

.alert-content {
    flex: 1;
    font-size: 13px;
    color: #7f1d1d;
}

[data-theme="dark"] .alert-content {
    color: #fca5a5;
}

.alert-content strong {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

/* ===== BODY DO PAINEL ===== */
.timer-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    max-height: 400px;
}

.timer-panel-body::-webkit-scrollbar {
    width: 6px;
}

.timer-panel-body::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.timer-panel-body::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.timer-panel-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ===== CARDS DE TIMER ===== */
.timer-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.timer-card:last-child {
    margin-bottom: 0;
}

.timer-card:hover {
    border-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
    transform: translateY(-2px);
}

.timer-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.timer-card-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.timer-card-title:hover {
    color: #f59e0b;
}

.timer-card-column {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== TEMPO DO CARD ===== */
.timer-card-time {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 8px;
    margin-bottom: 12px;
}

[data-theme="dark"] .timer-card-time {
    background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
}

.timer-card-time svg {
    stroke: #92400e;
    stroke-width: 2;
    flex-shrink: 0;
}

[data-theme="dark"] .timer-card-time svg {
    stroke: #fbbf24;
}

.timer-card-time-value {
    font-size: 20px;
    font-weight: 700;
    color: #92400e;
    font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .timer-card-time-value {
    color: #fbbf24;
}

.timer-card-time-label {
    font-size: 11px;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
}

[data-theme="dark"] .timer-card-time-label {
    color: #fbbf24;
}

/* ===== USUÁRIOS DO CARD ===== */
.timer-card-users {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.timer-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

.timer-user-avatar {
    width: 32px;
    height: 32px;
    background: #6366f1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.timer-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.timer-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.timer-user-time {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.timer-user-indicator {
    color: #ef4444;
    font-size: 12px;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== AÇÕES DO CARD ===== */
.timer-card-actions {
    display: flex;
    gap: 8px;
}

.timer-card-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 8px 12px;
}

/* ===== ESTADO VAZIO ===== */
.timer-panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== FOOTER DO PAINEL ===== */
.timer-panel-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 0 0 16px 16px;
}

.timer-panel-footer .btn {
    width: 100%;
    font-size: 13px;
    padding: 10px 16px;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .timer-indicator {
        margin-left: 10px;
    }
    
    .timer-indicator-button {
        padding: 6px 12px;
        gap: 8px;
    }
    
    .timer-indicator-icon {
        width: 32px;
        height: 32px;
    }
    
    .timer-indicator-count {
        font-size: 16px;
    }
    
    .timer-indicator-label {
        font-size: 10px;
    }
    
    .timer-panel {
        width: 95vw;
        right: 2.5vw;
        left: auto;
    }
    
    .timer-card-actions {
        flex-direction: column;
    }
}

/* ===== ANIMAÇÃO DE ENTRADA ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timer-panel.open {
    animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ====== ESTILOS PARA CONTROLE DE PERMISSÃO ====== */

.permission-warning {
    background: #fef3c7;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #f59e0b;
    animation: slideIn 0.3s ease-out;
}

[data-theme="dark"] .permission-warning {
    background: #78350f;
    color: #fde68a;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.permission-warning::before {
    content: '🚫';
    font-size: 20px;
}

/* Melhorias adicionais para o formulário de membros */
.add-member-form .btn-small {
    white-space: nowrap;
    padding: 8px 16px;
    min-width: auto;
}

/* Ajuste para o select no formulário de membros */
.add-member-form select.add-member-input {
    cursor: pointer;
    appearance: auto;
}

.add-member-form select.add-member-input:hover {
    border-color: var(--border-hover);
}

/* Responsivo - em telas menores, empilhar verticalmente */
@media (max-width: 480px) {
    .add-member-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .add-member-input {
        max-width: 100%;
    }
}

/* ================================================================
   PADRONIZAÇÃO DOS BOTÕES DE ADICIONAR (v1.2)
   ================================================================ */

/* Padronizar botões de adicionar (membros e subtarefas) */
.add-member-form .btn-small,
.add-subtask-form .btn-small {
    white-space: nowrap;
    padding: 8px 16px;
    min-width: auto;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

/* Garantir que o botão de sucesso tenha o mesmo visual */
.add-member-form .btn-success,
.add-subtask-form .btn-success {
    background: var(--green);
    color: white;
    border: none;
}

.add-member-form .btn-success:hover,
.add-subtask-form .btn-success:hover {
    background: #519839;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.add-member-form .btn-success:active,
.add-subtask-form .btn-success:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Garantir gap consistente entre os formulários */
.add-member-form,
.add-subtask-form {
    gap: 10px;
}


.logo-img-dark { display: none; }
[data-theme="dark"] .logo-img-dark { display: inline-block; }
[data-theme="dark"] .logo-img-light { display: none; }


/*====================================================================
USER MENU DROPDOWN - SISTEMA COMPLETO
==================================================================== */

.user-menu-container {
 position: relative;
}

.user-menu {
 display: flex;
 align-items: center;
 gap: 8px;
 padding: 6px 12px;
 background: var(--input-bg);
 border: 1px solid var(--border-color);
 border-radius: 8px;
 cursor: pointer;
 transition: all 0.2s;
 user-select: none;
}

.user-menu:hover {
 background: var(--bg-tertiary);
 border-color: var(--border-hover);
}

.user-menu.active {
 background: var(--bg-tertiary);
 border-color: var(--blue);
}

.user-menu-arrow {
 transition: transform 0.3s ease;
 color: var(--text-secondary);
}

.user-menu.active .user-menu-arrow {
 transform: rotate(180deg);
}

.user-dropdown {
 position: absolute;
 top: calc(100% + 8px);
 right: 0;
 min-width: 240px;
 background: var(--bg-modal);
 border: 1px solid var(--border-color);
 border-radius: 12px;
 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
 opacity: 0;
 visibility: hidden;
 transform: translateY(-10px);
 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 z-index: 10000;
 overflow: hidden;
}

.user-dropdown.show {
 opacity: 1;
 visibility: visible;
 transform: translateY(0);
}

.user-dropdown-item {
 width: 100%;
 display: flex;
 align-items: center;
 gap: 12px;
 padding: 12px 16px;
 background: none;
 border: none;
 color: var(--text-primary);
 font-size: 14px;
 font-weight: 500;
 cursor: pointer;
 transition: all 0.2s;
 text-align: left;
}

.user-dropdown-item:hover {
 background: var(--bg-tertiary);
}

.user-dropdown-item:active {
 transform: scale(0.98);
}

.user-dropdown-item .item-icon {
 font-size: 18px;
 display: flex;
 align-items: center;
 justify-content: center;
 width: 24px;
}

.user-dropdown-divider {
 height: 1px;
 background: var(--border-color);
 margin: 4px 0;
}

/* Animação de entrada dos itens */
.user-dropdown.show .user-dropdown-item {
 animation: slideInItem 0.3s ease backwards;
}

.user-dropdown.show .user-dropdown-item:nth-child(1) { animation-delay: 0.05s; }
.user-dropdown.show .user-dropdown-item:nth-child(2) { animation-delay: 0.1s; }
.user-dropdown.show .user-dropdown-item:nth-child(3) { animation-delay: 0.15s; }
.user-dropdown.show .user-dropdown-item:nth-child(4) { animation-delay: 0.2s; }

@keyframes slideInItem {
 from {
     opacity: 0;
     transform: translateX(-10px);
 }
 to {
     opacity: 1;
     transform: translateX(0);
 }
}

/* Modo Escuro */
[data-theme="dark"] .user-dropdown {
 background: var(--bg-secondary);
 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Responsivo */
@media (max-width: 768px) {
 .user-dropdown {
     right: -8px;
     min-width: 220px;
 }
 
 .user-name {
     display: none;
 }
}

/* ============================================
   AJUSTES DE ALINHAMENTO - MODAL CRM V2
   ============================================ */

/* Container para campos lado a lado */
.modal-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Grupos de campos */
.modal-field-group {
    display: flex;
    flex-direction: column;
}

/* Labels com espaçamento consistente */
.modal-field-group .info-label {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inputs com altura consistente */
.modal-field-group .add-member-input {
    width: 100%;
    height: 40px;
    padding: 10px 12px;
    font-size: 14px;
}

/* Ajuste específico para selects */
.modal-section select.add-member-input {
    height: 40px;
}

/* Garantir que labels fiquem alinhadas no topo */
.modal-field-row .modal-field-group {
    align-items: stretch;
}

/* Espaçamento entre seções */
.modal-section {
    margin-bottom: 24px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

/* Ajuste para campos de data */
.modal-section > div[style*="grid-template-columns"] {
    gap: 16px;
    margin-top: 0;
}

.modal-section > div[style*="grid-template-columns"] > div {
    display: flex;
    flex-direction: column;
}

.modal-section > div[style*="grid-template-columns"] .info-label {
    margin-bottom: 6px;
}

.modal-section > div[style*="grid-template-columns"] .add-member-input {
    height: 40px;
}

/* Título das seções */
.modal-section h4 {
    margin-bottom: 16px !important;
    font-size: 14px;
    font-weight: 600;
}

/* Responsivo - empilhar em telas menores */
@media (max-width: 600px) {
    .modal-field-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}


image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: transform 0.2s ease;
}

.image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

.image-item img.error-image {
    opacity: 0.5;
    background: var(--bg-tertiary);
}

.image-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-item:hover .image-actions {
    opacity: 1;
}

.image-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.image-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.image-btn.delete:hover {
    background: #ef4444;
}

.image-btn.view:hover {
    background: #3b82f6;
}

.image-name {
    padding: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--bg-tertiary);
}

/* Adicione estes estilos ao seu arquivo CRM.css */

/* Botão de exclusão de etiqueta */
.label-delete-btn {
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
    opacity: 0;
    transform: scale(0.9);
}

.label-item:hover .label-delete-btn {
    opacity: 1;
    transform: scale(1);
}

.label-delete-btn:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.label-delete-btn:active {
    transform: scale(0.95);
}

/* Ajuste no label-item-content para acomodar o botão */
.label-item-content {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* Garantir que o label-color seja clicável */
.label-color {
    cursor: pointer;
    transition: all 0.2s ease;
}

.label-color:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Animação de remoção */
@keyframes labelDeleteFade {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.label-item.deleting {
    animation: labelDeleteFade 0.3s ease forwards;
}


/* ============================================
   MODAL DE CONFIRMAÇÃO CUSTOMIZADO
   ============================================ */

   .custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-confirm-overlay.show {
    opacity: 1;
}

.custom-confirm-modal {
    background: #1e293b;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-confirm-overlay.show .custom-confirm-modal {
    transform: scale(1) translateY(0);
}

.custom-confirm-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
}

.custom-confirm-icon {
    font-size: 32px;
    line-height: 1;
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.custom-confirm-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.custom-confirm-body {
    padding: 24px 24px 32px 24px;
    color: #cbd5e1;
}

.custom-confirm-message {
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.custom-confirm-footer {
    padding: 0 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.custom-confirm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.custom-confirm-cancel {
    background: #334155;
    color: #e2e8f0;
}

.custom-confirm-cancel:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.custom-confirm-ok {
    color: white;
}

.custom-confirm-ok:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.custom-confirm-cancel:active,
.custom-confirm-ok:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .custom-confirm-modal {
        width: 95%;
        margin: 20px;
    }
    
    .custom-confirm-footer {
        flex-direction: column-reverse;
    }
    
    .custom-confirm-btn {
        width: 100%;
    }
}

/* ============================================
   BOTÃO DE EXCLUSÃO DE ETIQUETA
   ============================================ */

.label-delete-btn {
    background: rgba(239, 68, 68, 0.9);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
    opacity: 0;
    transform: scale(0.9);
}

.label-item:hover .label-delete-btn {
    opacity: 1;
    transform: scale(1);
}

.label-delete-btn:hover {
    background: rgba(239, 68, 68, 1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.label-delete-btn:active {
    transform: scale(0.95);
}

.label-item-content {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.label-color {
    cursor: pointer;
    transition: all 0.2s ease;
}

.label-color:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
/* ========================================== */
/* SISTEMA DE TEMPLATES DINÂMICOS */
/* ========================================== */

.creation-mode-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.creation-mode-card:hover {
    border-color: var(--blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.mode-badge-admin {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.module-toggle-checkbox {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.module-toggle-checkbox:hover {
    border-color: var(--blue);
    transform: translateX(2px);
}

.module-toggle-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--blue);
}

.module-toggle-checkbox span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
}

.custom-field-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    display: grid;
    grid-template-columns: 60px 1fr 160px 40px;
    gap: 12px;
    align-items: center;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideOutDown {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}

.field-icon-input, .field-label-input, .field-type-select {
    padding: 8px 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s;
}

.field-icon-input {
    font-size: 22px;
    text-align: center;
    width: 100%;
}

.field-icon-input:focus, .field-label-input:focus, .field-type-select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.1);
}

.remove-field-btn {
    background: var(--red);
    color: white;
    border: none;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-field-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.custom-template-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .custom-field-item {
        grid-template-columns: 1fr;
    }
    
    .field-icon-input {
        width: 60px;
        margin: 0 auto;
    }
}

/* ========================================================================
   CSS: CAMPOS PERSONALIZADOS
   ======================================================================== */
/* LOCALIZAÇÃO: Adicionar no final do CRM.css */

/* Container de campos personalizados */
#customFieldsContainer {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

#customFieldsContainer .no-fields {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

/* Campos personalizados no formulário */
.custom-field {
    margin-bottom: 20px;
}

.custom-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.custom-field label .required {
    color: #dc3545;
    margin-left: 4px;
    font-weight: bold;
}

.custom-field .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.custom-field .form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.custom-field textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.custom-field .field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Input groups (para currency) */
.custom-field .input-group {
    display: flex;
}

.custom-field .input-group-text {
    padding: 10px 12px;
    background: #e9ecef;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-weight: 600;
    color: #495057;
}

.custom-field .input-group input {
    border-radius: 0 6px 6px 0;
}

/* Checkboxes */
.custom-field .form-check {
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-field .form-check-input {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.custom-field .form-check-label {
    cursor: pointer;
    font-weight: 500;
    margin: 0;
}

/* Dados personalizados no card */
.dados-personalizados {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.dados-personalizados h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.dados-personalizados .dados-list {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
}

.dados-personalizados dt {
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

.dados-personalizados dd {
    margin: 0;
    color: #333;
    font-size: 13px;
}

/* Responsivo */
@media (max-width: 768px) {
    #customFieldsContainer {
        padding: 15px;
    }
    
    .custom-field .form-control {
        font-size: 16px; /* Evita zoom no iOS */
    }
    
    .dados-personalizados .dados-list {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .dados-personalizados dt {
        font-weight: 600;
        margin-top: 10px;
    }
    
    .dados-personalizados dd {
        margin-left: 10px;
    }
}

/* Estados de erro */
.custom-field .form-control.error {
    border-color: #dc3545;
}

.custom-field .error-message {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #dc3545;
}

/* Loading state */
.custom-field .form-control:disabled {
    background-color: #e9ecef;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animação de entrada */
.custom-field {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =============================================================================
   AJUSTES VISUAIS - CAMPOS NOVOS (COMENTÁRIO RÁPIDO + NOTA INTERNA)
   Mantém o mesmo estilo do restante do CRM
   ============================================================================= */

/* Comentário rápido (sempre disponível no card, dentro de Comentários/Atividade) */
.quick-comment-box{
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
}

.quick-comment-box textarea.form-control{
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 78px;
    width: 100%;
    outline: none;
    transition: all 0.2s;
}

.quick-comment-box textarea.form-control:focus{
    border-color: var(--blue);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.15);
}

/* Ajusta o botão do comentário para seguir o padrão do CRM */
.quick-comment-box .btn{
    border-radius: 10px;
}

/* Nota interna (na área principal do modal do card) */
#noteSection > div:not(.section-header){
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
}

#taskNoteInput.form-control{
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 90px;
    width: 100%;
    outline: none;
    transition: all 0.2s;
}

#taskNoteInput.form-control:focus{
    border-color: var(--blue);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(0, 121, 191, 0.15);
}

#noteSection .btn{
    border-radius: 10px;
}

/* Melhor alinhamento/espaçamento quando o sidebar tem o form de comentário */
.sidebar-content .quick-comment-box{
    margin-bottom: 12px;
}

/* Responsáveis: quando não houver usuário na área, deixa o select com aparência consistente */
#responsavelSelect:disabled{
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--bg-tertiary);
}/* =============================================================================
   TIMER UI IMPROVEMENTS - CSS
   Melhorias visuais para o sistema de timers multi-usuário
   ========================================================================== */

/* Badge do Timer no Card */
.task-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--hover-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.task-timer-badge.timer-active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
    animation: timerPulse 2s ease-in-out infinite;
}

.task-timer-badge .active-users-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    padding: 0 4px;
}

@keyframes timerPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }
}

/* Container de Usuários Ativos */
.active-users-container {
    margin-top: 20px;
    padding: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
}

.active-users-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-color);
}

.active-users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.active-timer-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--hover-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.active-timer-user:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.active-timer-user.current-user {
    background: #dbeafe;
    border-color: #3b82f6;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.active-timer-user.current-user .user-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.user-timer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-time {
    font-size: 14px;
    font-weight: 700;
    color: #3b82f6;
    font-family: 'Courier New', monospace;
}

/* Display Principal do Timer */
#timerDisplay {
    font-size: 48px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: var(--text-color);
    text-align: center;
    padding: 20px;
    background: var(--hover-bg);
    border: 3px solid var(--border-color);
    border-radius: 12px;
    letter-spacing: 4px;
    transition: all 0.3s ease;
}

#timerDisplay.timer-running {
    color: #3b82f6;
    border-color: #3b82f6;
    background: #dbeafe;
    animation: timerGlow 2s ease-in-out infinite;
}

@keyframes timerGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
    }
}

/* Botão de Toggle Timer */
#toggleTimerBtn {
    min-width: 150px;
    height: 50px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
}

#toggleTimerBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#toggleTimerBtn:active:not(:disabled) {
    transform: translateY(0);
}

/* Estado Sem Usuários Ativos */
.no-active-users {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.no-users-icon {
    font-size: 48px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Indicador de Sincronização */
.sync-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

.sync-indicator.syncing {
    opacity: 1;
    border-color: #3b82f6;
    color: #3b82f6;
}

.sync-indicator .sync-icon {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Timer Stats - Card Sumário */
.timer-stats-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
}

.timer-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.timer-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.timer-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

.timer-stat-value.highlight {
    color: #3b82f6;
}

/* Histórico de Timer */
.timer-history {
    margin-top: 20px;
}

.timer-history-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.timer-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.timer-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: var(--hover-bg);
    border-radius: 8px;
    font-size: 13px;
}

.timer-history-user {
    font-weight: 600;
    color: var(--text-color);
}

.timer-history-time {
    font-family: 'Courier New', monospace;
    color: #3b82f6;
}

.timer-history-date {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Responsividade */
@media (max-width: 768px) {
    #timerDisplay {
        font-size: 36px;
        padding: 15px;
        letter-spacing: 2px;
    }
    
    .active-timer-user {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .timer-stats-card {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sync-indicator {
        bottom: 10px;
        right: 10px;
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* Animações Suaves */
.timer-fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status Badge do Timer */
.timer-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.timer-status-badge.running {
    background: #dbeafe;
    color: #1e40af;
}

.timer-status-badge.paused {
    background: #fef3c7;
    color: #92400e;
}

.timer-status-badge.stopped {
    background: #fee2e2;
    color: #991b1b;
}

/* Tooltip Informativo */
.timer-tooltip {
    position: relative;
    cursor: help;
}

.timer-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    font-weight: normal;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.timer-tooltip:hover::after {
    opacity: 1;
}

/* Dark Mode Support */
[data-theme="dark"] .task-timer-badge.timer-active {
    background: #1e3a8a;
    border-color: #3b82f6;
    color: #93c5fd;
}

[data-theme="dark"] .active-timer-user.current-user {
    background: #1e3a8a;
    border-color: #3b82f6;
}

[data-theme="dark"] #timerDisplay.timer-running {
    background: #1e3a8a;
    border-color: #3b82f6;
    color: #93c5fd;
}