#modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 60; display: none; justify-content: center; align-items: center; padding: 15px; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; user-select: none; }
.modal-content { background: rgba(20, 20, 20, 0.95); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 20px; width: 100%; max-width: 400px; padding: 20px; display: flex; flex-direction: column; max-height: 90vh; overflow: hidden; cursor: default; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }

.title-input { font-size: 22px; font-weight: 600; margin-bottom: 15px; min-height: 28px; white-space: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.title-input::-webkit-scrollbar { display: none; }

/* NUEVO: Límite de texto largo y Scroll sin afectar otros Divs */
.note-body-input { 
    min-height: 60px; 
    max-height: 35vh; /* Límite inteligente para que no empuje todo */
    overflow-y: auto; /* Activa el scroll interno */
    font-size: 15px; 
    margin-bottom: 15px; 
    line-height: 1.5; 
    scrollbar-width: thin; 
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}
.note-body-input::-webkit-scrollbar { width: 4px; }
.note-body-input::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 4px; }

.modal-tags-container { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tag-pill { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.15); padding: 6px 12px; border-radius: 16px; font-size: 12px; }
.tag-pill button { background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; display: flex; align-items: center; }
.tag-pill button:hover { color: #ffffff; }
.tag-input-group { display: flex; align-items: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; overflow: hidden; }
.tag-input-group input { font-size: 13px; }

.last-modified-text { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 15px; }

.img-preview-container { position: relative; margin-bottom: 15px; }
#image-preview { width: 100%; border-radius: 12px; object-fit: contain; max-height: 200px; border: 1px solid rgba(255, 255, 255, 0.1); }
#btn-remove-img { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,0.6); border-radius: 50%; padding: 4px; backdrop-filter: blur(5px); }

.modal-footer { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 15px; width: 100%; }
.file-label { cursor: pointer; }

/* CONFIRMACIÓN Y TOAST */
#confirm-dialog { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 100; display: none; justify-content: center; align-items: center; padding: 20px; }
.confirm-box { background: rgba(20,20,20,0.95); border: 1px solid rgba(255,255,255,0.2); padding: 20px; border-radius: 16px; width: 100%; max-width: 320px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.6); }
.confirm-box p { font-size: 16px; line-height: 1.5; margin-bottom: 25px; color: #ffffff; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions button { flex: 1; }

.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: #ffffff; color: #000000; padding: 12px 20px; border-radius: 30px; display: none; align-items: center; justify-content: space-between; gap: 15px; z-index: 80; box-shadow: 0 5px 20px rgba(0,0,0,0.5); font-weight: 500; font-size: 14px; white-space: nowrap; max-width: 90%; }
.btn-undo { background: none; border: none; color: #0055ff; font-weight: 600; font-size: 14px; cursor: pointer; text-transform: uppercase; padding: 0; margin: 0; }