/* ==========================================================================
   KOGNVS NOTAS (GOOGLE KEEP CLONE) - CSS STYLES
   Dark Glassmorphism, Masonry Grid, Responsive Layout & Micro-interactions
   ========================================================================== */

/* Container Principal do Módulo de Notas */
#view-notas {
    display: none;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--bg-main, #0d0f12);
    padding: 1.5rem 2rem 3rem 2rem;
}

#view-notas.active {
    display: block;
}

.notas-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Header & Barra Superior */
.notas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 0.5rem;
}

.notas-header-left h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main, #f8fafc);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.notas-header-left p {
    color: var(--text-muted, #cbd5e1);
    font-size: 0.88rem;
    margin-top: 4px;
}

/* Barra de Busca e Filtros */
.notas-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.notas-search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 480px;
}

.notas-search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim, #94a3b8);
    font-size: 0.9rem;
}

.notas-search-input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-main, #f8fafc);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.notas-search-input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary, #38bdf8);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.notas-status-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 3px;
    gap: 4px;
}

.notas-status-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #cbd5e1);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.notas-status-btn.active {
    background: var(--primary, #38bdf8);
    color: #0b0f19;
    font-weight: 600;
}

/* ==========================================================================
   BARRA DE CHIPS DE TAGS / FILTROS DINÂMICOS
   ========================================================================== */
.notas-tags-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0.25rem 0 0.75rem 0;
    min-height: 42px;
}

.notas-tags-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 4px 6px 4px;
    width: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Ocultar barra de rolagem nativa */
.notas-tags-bar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Efeito suave de fade nas bordas quando há overflow */
.notas-tags-wrapper.has-overflow.can-scroll-left::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 36px;
    background: linear-gradient(90deg, var(--bg-main, #0d0f12) 15%, transparent 100%);
    pointer-events: none;
    z-index: 3;
    border-radius: 8px 0 0 8px;
}

.notas-tags-wrapper.has-overflow.can-scroll-right::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 36px;
    background: linear-gradient(270deg, var(--bg-main, #0d0f12) 15%, transparent 100%);
    pointer-events: none;
    z-index: 3;
    border-radius: 0 8px 8px 0;
}

/* Botões de navegação lateral (setinhas suaves flutuantes) */
.notas-tags-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(24, 29, 40, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-main, #f8fafc);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.notas-tags-scroll-btn:hover {
    background: rgba(35, 42, 58, 0.98);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.notas-tags-scroll-btn.left {
    left: -6px;
}

.notas-tags-scroll-btn.right {
    right: -6px;
}

/* Chips de Tags Modernos & Refinados */
.tag-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-muted, #cbd5e1);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.tag-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main, #f8fafc);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.tag-chip:active {
    transform: translateY(0);
}

/* Ícone de Hashtag e Ícone Geral */
.tag-chip-hash {
    font-weight: 700;
    font-size: 0.8rem;
    opacity: 0.55;
    color: var(--text-dim, #94a3b8);
    transition: opacity 0.2s ease, color 0.2s ease;
}

.tag-chip:hover .tag-chip-hash {
    opacity: 0.9;
    color: var(--primary, #38bdf8);
}

.tag-chip-icon {
    font-size: 0.8rem;
    opacity: 0.75;
}

/* Badge com Contagem de Notas */
.tag-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-dim, #94a3b8);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    transition: all 0.2s ease;
}

.tag-chip:hover .tag-chip-count {
    background: rgba(255, 255, 255, 0.14);
    color: var(--text-main, #f8fafc);
}

/* Estado Ativo (Selecionado) */
.tag-chip.active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary, #38bdf8) 22%, rgba(255,255,255,0.06)), color-mix(in srgb, var(--primary, #38bdf8) 12%, rgba(255,255,255,0.02)));
    border-color: var(--primary, #38bdf8);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 0 16px color-mix(in srgb, var(--primary, #38bdf8) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.tag-chip.active .tag-chip-hash,
.tag-chip.active .tag-chip-icon {
    opacity: 1;
    color: #ffffff;
}

.tag-chip.active .tag-chip-count {
    background: color-mix(in srgb, var(--primary, #38bdf8) 40%, rgba(255,255,255,0.25));
    color: #ffffff;
}

/* Ícone de limpar filtro ao lado da tag ativa */
.tag-chip-clear {
    margin-left: 2px;
    font-size: 0.72rem;
    opacity: 0.75;
    padding: 2px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.tag-chip-clear:hover {
    opacity: 1;
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.2);
}

/* Barra de Captura Rápida (Estilo Google Keep) */
.notas-quick-create-wrapper {
    display: flex;
    justify-content: center;
    margin: 0.5rem 0 1.5rem 0;
}

.notas-quick-create-box {
    width: 100%;
    max-width: 720px;
    background: var(--bg-card, #181d28);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease;
    overflow: hidden;
}

.notas-quick-create-box.expanded {
    max-width: 720px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.22);
}

.notas-create-simple-input {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: text;
    gap: 12px;
}

.notas-create-simple-input span {
    flex: 1;
    color: var(--text-dim, #94a3b8);
    font-size: 0.95rem;
    font-weight: 400;
}

.notas-simple-actions {
    display: flex;
    gap: 8px;
}

.notas-simple-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #cbd5e1);
    font-size: 1.05rem;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notas-simple-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main, #f8fafc);
}

/* Formulário de Criação Expandido */
.notas-create-full-form {
    padding: 16px 20px 14px 20px;
}

.nota-input-title {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main, #f8fafc);
    font-size: 1.05rem;
    font-weight: 600;
    outline: none;
    margin-bottom: 10px;
}

.nota-input-title::placeholder {
    color: var(--text-dim, #94a3b8);
}

.nota-input-body {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-body, #e2e8f0);
    font-size: 0.92rem;
    line-height: 1.5;
    outline: none;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.nota-input-body::placeholder {
    color: var(--text-dim, #94a3b8);
}

/* Lista de Itens do Checklist na Criação */
.create-checklist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.create-check-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.create-check-item-row i {
    color: var(--text-dim, #94a3b8);
    font-size: 0.95rem;
}

.check-item-input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 0;
    color: var(--text-body, #e2e8f0);
    font-size: 0.9rem;
    outline: none;
}

.check-item-input:focus {
    border-bottom-color: var(--primary, #38bdf8);
}

.btn-remove-check-item {
    background: transparent;
    border: none;
    color: var(--text-dim, #94a3b8);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.btn-remove-check-item:hover {
    color: #f43f5e;
}

.btn-add-item-plus {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: var(--text-muted, #cbd5e1);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: 4px;
}

.btn-add-item-plus:hover {
    border-color: var(--primary, #38bdf8);
    color: var(--primary, #38bdf8);
}

/* Rodapé do Formulário de Criação */
.notas-create-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 10px;
    flex-wrap: wrap;
}

.notas-create-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.create-color-palette {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-shrink: 0;
}

.color-dot-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.color-dot-btn:hover {
    transform: scale(1.25);
}

.notas-create-btn-group {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.btn-nota-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted, #cbd5e1);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-nota-cancel:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main, #f8fafc);
}

.btn-nota-save {
    background: var(--primary, #38bdf8);
    border: none;
    color: #0b0f19;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-nota-save:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Mural Masonry Grid */
.notas-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim, #94a3b8);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notas-masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

/* Card Individual de Nota */
.nota-card {
    position: relative;
    background: var(--bg-card, #181d28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 16px 16px 12px 16px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nota-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-pin-nota {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-dim, #94a3b8);
    font-size: 0.95rem;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 6px;
}

.nota-card:hover .btn-pin-nota,
.btn-pin-nota.pinned {
    opacity: 1;
}

.btn-pin-nota.pinned {
    color: var(--primary, #38bdf8);
    transform: rotate(45deg);
}

.nota-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main, #f8fafc);
    padding-right: 24px;
    word-break: break-word;
}

.nota-body-text {
    color: var(--text-body, #e2e8f0);
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
    max-height: 280px;
    overflow-y: auto;
}

.nota-body-text p {
    margin-bottom: 6px;
}

.nota-body-text p:last-child {
    margin-bottom: 0;
}

/* Itens de Checklist no Card */
.nota-checklist-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nota-check-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-body, #e2e8f0);
    cursor: pointer;
    line-height: 1.4;
}

.nota-check-row input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--primary, #38bdf8);
    cursor: pointer;
}

.nota-check-row.concluido span {
    text-decoration: line-through;
    color: var(--text-dim, #94a3b8);
}

.nota-more-items {
    font-size: 0.78rem;
    color: var(--text-dim, #94a3b8);
    font-style: italic;
    margin-top: 2px;
}

/* Tags no Card */
.nota-tags-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.nota-tag-pill {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-muted, #cbd5e1);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.nota-tag-pill:hover {
    background: rgba(56, 189, 248, 0.2);
    color: var(--primary, #38bdf8);
}

/* Timestamp discreto de criação e edição */
.nota-timestamp-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: var(--text-dim, #94a3b8);
    margin-top: 8px;
    margin-bottom: 2px;
    line-height: 1.2;
    user-select: none;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.nota-card:hover .nota-timestamp-info {
    opacity: 0.95;
}

.nota-timestamp-info i {
    font-size: 0.62rem;
    opacity: 0.8;
}

.nota-timestamp-info .timestamp-sep {
    opacity: 0.4;
    margin: 0 1px;
}

.modal-edit-timestamp-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--text-dim, #94a3b8);
    padding: 2px 0 6px 0;
    user-select: none;
    opacity: 0.8;
}

.modal-edit-timestamp-info i {
    font-size: 0.65rem;
}

.modal-edit-timestamp-info .timestamp-sep {
    opacity: 0.4;
    margin: 0 2px;
}

/* Barra de Ações no Card */
.nota-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nota-card:hover .nota-card-actions {
    opacity: 1;
}

.nota-action-icon {
    background: transparent;
    border: none;
    color: var(--text-muted, #cbd5e1);
    padding: 6px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nota-action-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main, #f8fafc);
}

.nota-action-icon.delete-btn:hover {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.15);
}

/* Seletor de Cor no Card */
.nota-color-picker-btn {
    position: relative;
    display: inline-block;
}

.nota-color-picker-btn > i {
    padding: 6px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-muted, #cbd5e1);
    cursor: pointer;
    transition: all 0.15s ease;
}

.nota-color-picker-btn:hover > i,
.nota-color-picker-btn.active > i {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main, #f8fafc);
}

.color-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e2430;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 8px;
    margin-bottom: 6px;
    gap: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    z-index: 999;
    white-space: nowrap;
}

/* Ponte invisível para o mouse não perder o hover */
.color-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.nota-color-picker-btn:hover .color-dropdown,
.color-dropdown.active {
    display: flex !important;
}

.color-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.color-circle:hover {
    transform: scale(1.35);
    border-color: #fff;
}

/* Barra de Formatação Markdown */
.nota-format-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 3px 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.format-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #cbd5e1);
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--primary, #38bdf8);
}

/* Estilos de Drag and Drop (Arrastar para reposicionar) */
.nota-card[draggable="true"] {
    cursor: grab;
}

.nota-card[draggable="true"]:active {
    cursor: grabbing;
}

.nota-card.is-dragging {
    opacity: 0.35;
    transform: scale(0.96) rotate(1deg);
    border: 2px dashed var(--primary, #38bdf8) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.nota-card.drag-over-target {
    border-color: var(--primary, #38bdf8) !important;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.4) !important;
    transform: translateY(-4px) scale(1.02);
}

/* Estilos de Lembretes, Imagens, Anexos e Links */
.nota-reminder-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: var(--primary, #38bdf8);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 6px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nota-reminder-pill:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: var(--primary, #38bdf8);
}

.nota-reminder-pill .btn-remove-reminder {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 0.75rem;
    padding: 0;
    margin-left: 2px;
    cursor: pointer;
    opacity: 0.7;
}

.nota-reminder-pill .btn-remove-reminder:hover {
    opacity: 1;
    color: #f43f5e;
}

/* Imagens Anexadas no Card */
.nota-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 6px;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

.nota-image-wrapper {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    background: #090d16;
}

.nota-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nota-image-wrapper:hover img {
    transform: scale(1.05);
}

.nota-image-wrapper .btn-delete-img {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.nota-image-wrapper:hover .btn-delete-img {
    opacity: 1;
}

/* Anexos de Documentos */
.nota-attachments-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 8px;
}

.nota-attachment-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 5px 8px;
    color: var(--text-main, #f8fafc);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.15s ease;
}

.nota-attachment-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.nota-attachment-pill .attachment-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nota-attachment-pill .btn-delete-anexo {
    background: transparent;
    border: none;
    color: var(--text-dim, #94a3b8);
    cursor: pointer;
    font-size: 0.75rem;
}

.nota-attachment-pill .btn-delete-anexo:hover {
    color: #f43f5e;
}

/* Links Anexados */
.nota-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.nota-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
    font-size: 0.78rem;
    padding: 3px 8px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.nota-link-chip:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: #c084fc;
}

.nota-link-chip .btn-delete-link {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0.7;
}

.nota-link-chip .btn-delete-link:hover {
    opacity: 1;
    color: #f43f5e;
}

/* Popover do Lembrete (Estilo Google Keep) */
.reminder-popover {
    position: absolute;
    bottom: 100%;
    left: 0;
    transform: translateY(-8px);
    width: 270px;
    background: #181d28;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    padding: 12px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 8px;
}

.reminder-popover.active {
    display: flex;
}

.reminder-popover-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main, #f8fafc);
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 6px;
}

.reminder-presets-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reminder-preset-btn {
    background: transparent;
    border: none;
    color: var(--text-body, #e2e8f0);
    text-align: left;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s ease;
}

.reminder-preset-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary, #38bdf8);
}

.reminder-preset-time {
    color: var(--text-dim, #94a3b8);
    font-size: 0.75rem;
}

.reminder-custom-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 8px;
}

.reminder-custom-form input,
.reminder-custom-form select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: var(--text-main, #f8fafc);
    padding: 6px 8px;
    font-size: 0.8rem;
    width: 100%;
}

.reminder-custom-form button {
    background: var(--primary, #38bdf8);
    color: #0d1117;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    padding: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.reminder-custom-form button:hover {
    opacity: 0.9;
}

/* Empty State & Loading State */
.notas-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-dim, #94a3b8);
    width: 100%;
    grid-column: 1 / -1;
}

.notas-empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.notas-empty-state h3 {
    font-size: 1.15rem;
    color: var(--text-muted, #cbd5e1);
    margin-bottom: 0.4rem;
}

.notas-loading-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-dim, #94a3b8);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.notas-loading-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary, #38bdf8);
}

/* Modais de Edição e Execução de Agente */
.modal-nota-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content-nota {
    width: 100%;
    max-width: 740px;
    background: var(--bg-card, #181d28);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content-nota .nota-input-title {
    font-size: 1.2rem;
}

.modal-content-nota .nota-input-body {
    min-height: 180px;
    font-size: 0.95rem;
}

.edit-check-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.edit-check-item-text {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-body, #e2e8f0);
    font-size: 0.92rem;
    padding: 4px 0;
    outline: none;
}

.edit-check-item-text.concluido {
    text-decoration: line-through;
    color: var(--text-dim, #94a3b8);
}

.modal-nota-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
    flex-wrap: wrap;
}

/* Modal Executar com Agente */
.agent-grid-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin: 1rem 0;
}

.agent-select-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agent-select-card:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: var(--primary, #38bdf8);
    transform: translateY(-2px);
}

.agent-select-card i {
    font-size: 1.4rem;
    margin-bottom: 6px;
    display: block;
    color: var(--primary, #38bdf8);
}

.agent-select-card span {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-main, #f8fafc);
}

.nota-preview-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85rem;
    color: var(--text-muted, #cbd5e1);
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    #view-notas {
        padding: 1rem 1rem 4rem 1rem;
    }

    .notas-masonry-grid {
        grid-template-columns: 1fr;
    }

    .nota-card-actions {
        opacity: 1;
    }

    .notas-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .notas-search-box {
        max-width: 100%;
    }
}

/* ==========================================================================
   BADGES DE ORIGEM (CEO VS KOGNVS) E FILTROS DE CLASSE
   ========================================================================== */
.nota-origin-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    user-select: none;
}

.nota-origin-badge.ceo {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.nota-origin-badge.kognvs {
    background: rgba(168, 85, 247, 0.18);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
}

/* Tag BUG com destaque */
.nota-tag-pill.bug {
    background: rgba(244, 63, 94, 0.22) !important;
    color: #fda4af !important;
    border: 1px solid rgba(244, 63, 94, 0.45) !important;
    font-weight: 700 !important;
}

.nota-tag-pill.bug:hover {
    background: rgba(244, 63, 94, 0.38) !important;
    color: #fff !important;
}

/* Barra de Filtros de Classe */
.notas-classe-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-filtro-classe {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted, #cbd5e1);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-filtro-classe:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main, #f8fafc);
}

.btn-filtro-classe.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    font-weight: 600;
}

.btn-filtro-classe.kognvs-filter.active {
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.45);
    color: #c084fc;
}

.btn-filtro-classe.bug-filter.active {
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.5);
    color: #fda4af;
}
