/* =========================================
   KREVIA - Components
   ========================================= */

/* CARDS */
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.25rem; transition: var(--transition); }
.card:hover { border-color: var(--border-light); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-title { font-size: 1rem; font-weight: 600; }
.card-icon { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.card-value { font-size: 2rem; font-weight: 800; }
.card-label { font-size: .8rem; color: var(--text-secondary); margin-top: .25rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { cursor: pointer; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.2rem; border-radius: var(--radius-md); font-size: .875rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: var(--transition); border: none; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--green); color: white; }
.btn-success:hover { background: #16a34a; }
.btn-sm { padding: .4rem .8rem; font-size: .8rem; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1rem; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--bg-tertiary); border: 1px solid var(--border-color); color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.btn-icon:hover { color: var(--accent); border-color: var(--accent); }
.btn-block { width: 100%; justify-content: center; }

/* FORMS */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .5px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: .65rem .9rem; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-family: inherit; font-size: .9rem; transition: var(--transition); }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* BADGES */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 20px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge-gray { background: var(--gray-light); color: var(--gray); }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-yellow { background: var(--yellow-light); color: var(--yellow); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-green { background: var(--green-light); color: var(--green); }
.badge-red { background: var(--red-light); color: var(--red); }
.badge-purple { background: var(--purple-light); color: var(--purple); }
.badge-accent { background: var(--accent-light); color: var(--accent); }
.priority-alta { border-left: 3px solid var(--red); }
.priority-media { border-left: 3px solid var(--yellow); }
.priority-baixa { border-left: 3px solid var(--green); }

/* PAGE HEADER */
.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 800; }
.page-header-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.section { margin-bottom: 2rem; }
.section-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }

/* KANBAN */
.kanban-board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; min-height: 400px; }
.kanban-column { min-width: 280px; max-width: 320px; flex-shrink: 0; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); display: flex; flex-direction: column; }
.kanban-column-header { padding: .75rem 1rem; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; font-size: .85rem; font-weight: 700; }
.kanban-count { background: var(--bg-tertiary); padding: .15rem .5rem; border-radius: 10px; font-size: .75rem; font-weight: 600; }
.kanban-cards { flex: 1; padding: .5rem; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; min-height: 100px; }
.kanban-cards.drag-over { background: var(--accent-light); border-radius: var(--radius-md); }
.kanban-card { position: relative; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: .75rem; cursor: grab; transition: var(--transition); }
.kanban-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.kanban-card.dragging { opacity: .5; transform: rotate(2deg); }
.kanban-card-title { font-size: .85rem; font-weight: 600; margin-bottom: .4rem; padding-right: 1.5rem; }
.kanban-card-meta { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .75rem; color: var(--text-muted); }
.kanban-card-delete { position: absolute; top: .4rem; right: .4rem; width: 22px; height: 22px; background: transparent; border: none; color: var(--text-muted); cursor: pointer; border-radius: var(--radius-sm); font-size: .7rem; display: flex; align-items: center; justify-content: center; opacity: 0; transition: var(--transition); }
.kanban-card:hover .kanban-card-delete { opacity: 1; }
.kanban-card-delete:hover { background: var(--red-light); color: var(--red); }
.kanban-drop-indicator { height: 3px; margin: 2px 0; background: var(--accent); border-radius: 2px; box-shadow: 0 0 6px rgba(200,255,0,.5); pointer-events: none; }

/* Horizontal scroll cues for kanban: fade the edges only when there's
   content off-screen in that direction. `can-scroll-left/right` classes
   are toggled by ScriptsPage._attachScrollCue. */
.kanban-scroll { position: relative; }
.kanban-scroll::before,
.kanban-scroll::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 1rem;
    width: 48px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
    z-index: 3;
}
.kanban-scroll::before { left: 0; background: linear-gradient(to right, var(--bg-primary) 10%, rgba(10,10,10,0)); }
.kanban-scroll::after { right: 0; background: linear-gradient(to left, var(--bg-primary) 10%, rgba(10,10,10,0)); }
.kanban-scroll.can-scroll-left::before,
.kanban-scroll.can-scroll-right::after { opacity: 1; }

/* ─── Tag Input — chip-style multi-value picker ─── */
.tag-input { border: 1px solid var(--border-color); background: var(--bg-input, var(--bg-card)); border-radius: var(--radius-sm); padding: .35rem; transition: var(--transition); }
.tag-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,255,0,.12); }
.tag-input-chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.tag-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .15rem .2rem .55rem; background: rgba(200,255,0,.1); border: 1px solid rgba(200,255,0,.25); color: var(--accent); border-radius: 999px; font-size: .75rem; font-weight: 600; }
.tag-chip-label { line-height: 1; }
.tag-chip-x { background: transparent; border: 0; color: inherit; opacity: .65; cursor: pointer; font-size: .95rem; line-height: 1; padding: 0 .35rem; border-radius: 999px; }
.tag-chip-x:hover { opacity: 1; background: rgba(239,68,68,.2); color: var(--red); }
.tag-input-field { flex: 1; min-width: 100px; border: 0; background: transparent; color: var(--text-primary); font-size: .85rem; padding: .25rem .35rem; outline: none; }
.tag-input-field::placeholder { color: var(--text-muted); font-size: .8rem; }

/* TABLE */
.table-container { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border-color); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--bg-secondary); padding: .75rem 1rem; text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-secondary); border-bottom: 1px solid var(--border-color); white-space: nowrap; cursor: pointer; user-select: none; }
.data-table th:hover { color: var(--accent); }
.data-table td { padding: .65rem 1rem; border-bottom: 1px solid var(--border-color); font-size: .85rem; vertical-align: middle; }
.data-table tr:hover td { background: var(--bg-hover); }
.data-table .actions-cell { white-space: nowrap; display: flex; gap: .25rem; }

/* FILTERS */
.filters-bar { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; align-items: center; }
.filter-group { display: flex; align-items: center; gap: .35rem; }
.filter-group label { font-size: .8rem; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.filter-select { padding: .4rem .6rem; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-size: .8rem; font-family: inherit; }
.search-input { padding: .5rem .75rem .5rem 2rem; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-size: .85rem; min-width: 200px; font-family: inherit; }
.search-input:focus { outline: none; border-color: var(--accent); }
.search-wrapper { position: relative; }
.search-wrapper i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .85rem; }
.view-toggle { display: flex; gap: 2px; background: var(--bg-tertiary); border-radius: var(--radius-md); padding: 3px; }
.view-toggle-btn { padding: .4rem .8rem; border: none; background: transparent; color: var(--text-secondary); font-size: .8rem; font-weight: 600; cursor: pointer; border-radius: var(--radius-sm); transition: var(--transition); font-family: inherit; }
.view-toggle-btn.active { background: var(--accent); color: var(--accent-text); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.hidden { display: none; }
.modal-container { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); width: 100%; max-width: 700px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color); }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close { width: 32px; height: 32px; border-radius: var(--radius-sm); background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 1rem; transition: var(--transition); display: flex; align-items: center; justify-content: center; }
.modal-close:hover { color: var(--red); background: var(--red-light); }
.modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border-color); display: flex; gap: .5rem; justify-content: flex-end; }
.modal-footer.hidden { display: none; }

/* TOAST */
.toast-container { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 10000; display: flex; flex-direction: column; gap: .5rem; }
.toast { padding: .75rem 1rem; border-radius: var(--radius-md); font-size: .85rem; font-weight: 500; color: white; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: .5rem; max-width: 350px; }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.warning { background: var(--orange); }
.toast.info { background: var(--blue); }

/* LOADING / EMPTY */
.loading-spinner { display: flex; align-items: center; justify-content: center; padding: 3rem; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border-color); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.empty-state p { font-size: .95rem; }

/* TABS */
.tabs { display: flex; gap: 2px; margin-bottom: 1.5rem; overflow-x: auto; }
.tab-btn { padding: .6rem 1rem; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-secondary); font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: var(--transition); font-family: inherit; }
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ALERTS */
.alert { padding: .75rem 1rem; border-radius: var(--radius-md); font-size: .85rem; display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.alert-warning { background: var(--yellow-light); color: var(--yellow); border: 1px solid rgba(234, 179, 8, .3); }
.alert-danger { background: var(--red-light); color: var(--red); border: 1px solid rgba(239, 68, 68, .3); }
.alert-info { background: var(--blue-light); color: var(--blue); border: 1px solid rgba(59, 130, 246, .3); }

/* SETTINGS */
.settings-section { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.settings-section h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; gap: .5rem; }

/* PRODUCT MANAGEMENT */
.product-mgmt-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; transition: var(--transition); }
.product-mgmt-card:hover { border-color: var(--border-light); }
.product-mgmt-name { font-weight: 600; font-size: .9rem; }
.product-mgmt-actions { display: flex; gap: .25rem; }

/* PROVIDER CARDS */
.provider-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: .75rem; transition: var(--transition); }
.provider-card:hover { border-color: var(--border-light); }
.provider-card.provider-default { border-color: var(--green); background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), var(--bg-card)); }
.provider-card-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.provider-name { font-weight: 700; font-size: 1rem; }
.provider-actions { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.provider-card-details { display: flex; gap: 1.25rem; font-size: .83rem; color: var(--text-secondary); }
.provider-card-details i { margin-right: .3rem; color: var(--text-muted); }
.provider-test-result { margin-top: .5rem; min-height: 0; }

/* CUSTOM DURATION INPUT */
.custom-duration-wrap { display: none; margin-top: .5rem; }
.custom-duration-wrap.visible { display: flex; gap: .5rem; align-items: center; }
.custom-duration-wrap input { width: 80px; }

/* QUICK INPUT BAR */
.quick-input-bar { display: flex; gap: .75rem; margin-bottom: 1.5rem; align-items: stretch; }
.quick-input-bar input { flex: 1; padding: .8rem 1rem; background: var(--bg-input); border: 2px solid var(--border-color); border-radius: var(--radius-lg); color: var(--text-primary); font-size: 1rem; font-family: inherit; }
.quick-input-bar input:focus { outline: none; border-color: var(--accent); }
.quick-input-bar input::placeholder { color: var(--text-muted); }

/* RESPONSIVE - Components */
@media (max-width: 1024px) {
    .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header h1 { font-size: 1.25rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-card .card-value { font-size: 1.5rem; }
    .kanban-column { min-width: 260px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .filters-bar { flex-direction: column; align-items: stretch; }
    .search-input { min-width: unset; width: 100%; }
    .modal-container { max-width: 100%; margin: .5rem; }
    .quick-input-bar { flex-direction: column; }
    .quick-input-bar .btn { justify-content: center; }
    .toast-container { left: 1rem; right: 1rem; top: 1rem; }
    .toast { max-width: 100%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .page-header-actions { width: 100%; }
    .page-header-actions .btn { flex: 1; justify-content: center; }
}

/* UTILITY CLASSES */
.hidden { display: none !important; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* TIMER OVERLAY */
.timer-overlay {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    z-index: 900;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.timer-overlay.visible {
    transform: translateY(0);
    opacity: 1;
}
.timer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .75rem;
}
.timer-block-name {
    font-weight: 700;
    font-size: .85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}
.timer-mode-badge {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--accent);
    background: var(--accent-light);
    padding: .15rem .5rem;
    border-radius: 8px;
}
.timer-display {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    margin-bottom: .75rem;
    letter-spacing: 2px;
}
.timer-actions {
    display: flex;
    gap: .5rem;
    justify-content: center;
}

/* TIMER OVERLAY */
.timer-overlay { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 1rem 1.25rem; z-index: 9999; min-width: 220px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; }
.timer-overlay.visible { opacity: 1; transform: translateY(0); }
.timer-overlay .timer-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; gap: .5rem; user-select: none; }
.timer-overlay .timer-block-name { font-weight: 700; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.timer-overlay .timer-mode-badge { font-size: .65rem; padding: .15rem .4rem; border-radius: 8px; background: var(--accent-light); color: var(--accent); font-weight: 600; }
.timer-overlay .timer-display { font-size: 2rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; margin: .5rem 0; }
.timer-overlay .timer-actions { display: flex; gap: .5rem; justify-content: center; }
.timer-minimize-btn { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: .15rem .35rem; border-radius: 4px; font-size: .75rem; transition: var(--transition); }
.timer-minimize-btn:hover { color: var(--accent); background: var(--accent-light); }
.timer-overlay.minimized .timer-header { margin-bottom: 0; }
.timer-overlay.minimized .timer-display { font-size: 1.1rem; margin: .25rem 0 0; }
.timer-overlay.minimized .timer-actions { display: none; }
.timer-overlay.minimized .timer-block-name { display: none; }
.timer-overlay.minimized .timer-mode-badge { display: none; }
.timer-overlay.minimized { min-width: auto; padding: .5rem .75rem; cursor: pointer; }
@media (max-width: 768px) { .timer-overlay:not(.minimized) { left: .5rem; right: .5rem; bottom: .5rem; min-width: unset; } }

/* KANBAN ADD CARD */
.kanban-add-card-btn { width: 100%; padding: .5rem; background: transparent; border: 1px dashed var(--border-color); border-radius: var(--radius-sm); color: var(--text-muted); font-size: .8rem; cursor: pointer; transition: var(--transition); margin-top: .5rem; display: flex; align-items: center; justify-content: center; gap: .35rem; }
.kanban-add-card-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.kanban-quick-input { margin-top: .5rem; }

/* KANBAN INLINE EDIT */
.kanban-inline-input { width: 100%; padding: .25rem .4rem; font-size: .85rem; font-weight: 600; background: var(--bg-input); border: 1px solid var(--accent); border-radius: var(--radius-sm); color: var(--text-primary); font-family: inherit; outline: none; }

/* KANBAN ADD COLUMN */
.kanban-add-col { min-width: 50px; display: flex; align-items: center; justify-content: center; background: transparent; border: 2px dashed var(--border-color); border-radius: var(--radius-md); cursor: pointer; color: var(--text-muted); font-size: 1.2rem; transition: var(--transition); margin: 0; flex-shrink: 0; }
.kanban-add-col:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* Card hover delete button */
.card-delete-btn { position: absolute; top: .4rem; right: .4rem; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-secondary); border: 1px solid var(--border-color); color: var(--text-muted); font-size: .65rem; cursor: pointer; opacity: 0; transition: opacity .15s, color .15s, background .15s; display: flex; align-items: center; justify-content: center; z-index: 2; }
.nota-card, .prompt-card { position: relative; }
.nota-card:hover .card-delete-btn, .prompt-card:hover .card-delete-btn, .ideia-card:hover .card-delete-btn { opacity: 1; }
.card-delete-btn:hover { color: var(--red); background: var(--red-light); border-color: var(--red); }

/* GLOBAL SEARCH */
.global-search-overlay { position: fixed; inset: 0; z-index: 20000; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding-top: 15vh; opacity: 0; pointer-events: none; transition: opacity .2s; }
.global-search-overlay.visible { opacity: 1; pointer-events: auto; }
.global-search-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); overflow: hidden; }
.global-search-input-wrap { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border-color); }
.global-search-input-wrap i { color: var(--text-muted); font-size: 1rem; }
.global-search-input-wrap input { flex: 1; border: none; background: none; color: var(--text-primary); font-size: 1rem; outline: none; font-family: inherit; }
.global-search-input-wrap kbd { padding: .15rem .4rem; border-radius: 4px; font-size: .7rem; background: var(--bg-secondary); border: 1px solid var(--border-color); color: var(--text-muted); font-family: inherit; }
.global-search-results { max-height: 400px; overflow-y: auto; }
.global-search-hint { padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: .9rem; }
.global-search-group-label { padding: .5rem 1rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); background: var(--bg-secondary); display: flex; align-items: center; gap: .5rem; }
.global-search-item { padding: .65rem 1rem; cursor: pointer; transition: background .1s; border-bottom: 1px solid var(--border-color); }
.global-search-item:hover, .global-search-item.active { background: var(--accent-light); }
.global-search-item-title { font-weight: 600; font-size: .9rem; }
.global-search-item-sub { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; }

/* NOTIFICATION BELL */
.notification-bell { position: relative; }
.notification-badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: white; font-size: .6rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.notification-dropdown { position: absolute; top: 100%; right: 0; margin-top: .5rem; width: 320px; max-height: 400px; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); z-index: 15000; }
.notification-dropdown-header { padding: .75rem 1rem; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .85rem; }
.notification-item { padding: .65rem 1rem; border-bottom: 1px solid var(--border-color); cursor: pointer; transition: background .1s; font-size: .85rem; }
.notification-item:hover { background: var(--accent-light); }
.notification-item.unread { background: var(--bg-secondary); }
.notification-item .notif-title { font-weight: 600; }
.notification-item .notif-meta { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; }
.notification-empty { padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: .85rem; }
