/* =====================================================
   PANTALLA DE NOTAS - ALUMNOS
   ===================================================== */

.notes-screen-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    padding-bottom: 100px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.notes-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Header */
.notes-header {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.notes-back-btn {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 18px;
    transition: all 0.3s ease;
}

.notes-back-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(-2px);
}

.notes-title {
    flex: 1;
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.notes-title i {
    color: #667eea;
    font-size: 28px;
}

.notes-new-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.notes-new-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.notes-new-btn-text {
    display: none;
}

@media (min-width: 640px) {
    .notes-new-btn-text {
        display: inline;
    }
}

/* Search Bar */
.notes-search-bar {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: box-shadow 0.3s ease;
}

.notes-search-bar:focus-within {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.notes-search-icon {
    color: #667eea;
    font-size: 18px;
    flex-shrink: 0;
}

.notes-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
}

.notes-search-input::placeholder {
    color: #999;
}

.notes-search-clear {
    background: rgba(102, 126, 234, 0.1);
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.notes-search-clear:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.1);
}

/* Form Container */
.notes-form {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 28px;
    margin-bottom: 24px;
    animation: slideDown 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notes-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.notes-form-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notes-form-close {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: #ef4444;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-form-close:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.1);
}

.notes-form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 17px;
    margin-bottom: 20px;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #1f2937;
    background: #f9fafb;
    box-sizing: border-box;
}

.notes-form-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.notes-form-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
}

.notes-form-textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    resize: vertical;
    min-height: 200px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    line-height: 1.7;
    color: #374151;
    background: #f9fafb;
    box-sizing: border-box;
}

.notes-form-textarea::placeholder {
    color: #9ca3af;
}

.notes-form-textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: white;
}

.notes-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid #f3f4f6;
    flex-wrap: wrap;
    gap: 15px;
}

.notes-form-pin-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.2s;
}

.notes-form-pin-label:hover {
    background: rgba(245, 158, 11, 0.1);
}

.notes-form-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #f59e0b;
}

.notes-pin-icon {
    color: #9ca3af;
}

.notes-pin-icon-active {
    color: #f59e0b;
}

.notes-form-actions {
    display: flex;
    gap: 12px;
}

.notes-form-cancel {
    padding: 12px 24px;
    background: #f3f4f6;
    color: #666;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-form-cancel:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.notes-form-save {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.notes-form-save:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.notes-form-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Bulk Actions */
.notes-bulk-actions {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.notes-bulk-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.notes-select-all-btn {
    padding: 10px 16px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 10px;
    border: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.notes-select-all-btn:hover {
    background: #e5e7eb;
}

.notes-selected-count {
    color: #4b5563;
    font-weight: 500;
    font-size: 14px;
}

.notes-bulk-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.notes-export-selected-btn,
.notes-export-all-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    transition: all 0.3s ease;
}

.notes-export-selected-btn {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.notes-export-selected-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

.notes-export-all-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.notes-export-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Empty State */
.notes-empty {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 80px 20px;
    text-align: center;
}

.notes-empty-icon {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.notes-empty-text {
    color: #6b7280;
    font-size: 18px;
    margin-bottom: 30px;
}

.notes-empty-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.notes-empty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Notes List Container */
.notes-list-container {
    width: 100%;
}

/* Notes Grid */
.notes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .notes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .notes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Note Card */
.notes-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 5px solid transparent;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.notes-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notes-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.notes-card:hover::before {
    opacity: 1;
}

.notes-card-pinned {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, #fffbeb 0%, #ffffff 5%);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.2);
}

.notes-card-pinned::before {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
    opacity: 1;
}

.notes-card-selected {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
}

.notes-card-checkbox {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1;
}

.notes-checkbox-input {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
    cursor: pointer;
}

.notes-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
    padding-left: 35px;
}

.notes-card-title-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.notes-pin-badge {
    color: #f59e0b;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.notes-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    word-break: break-word;
    line-height: 1.4;
}

.notes-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.notes-action-btn {
    background: rgba(102, 126, 234, 0.08);
    border: none;
    color: #667eea;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.notes-action-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: scale(1.1);
}

.notes-action-edit {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.notes-action-pin {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.notes-action-export {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

.notes-action-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notes-action-delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

.notes-card-content {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.notes-card-text {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 16px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 15px;
    max-height: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

.notes-card-date {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.notes-card-date i {
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .notes-screen-container {
        padding: 16px;
    }

    .notes-header {
        padding: 16px 20px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .notes-title {
        font-size: 22px;
        width: 100%;
        order: 2;
    }

    .notes-back-btn {
        order: 1;
    }

    .notes-new-btn {
        order: 3;
        padding: 10px 18px;
        font-size: 14px;
    }

    .notes-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .notes-card {
        padding: 20px;
    }

    .notes-card-title {
        font-size: 18px;
    }

    .notes-form-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .notes-form-actions {
        width: 100%;
    }

    .notes-form-cancel,
    .notes-form-save {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .notes-screen-container {
        padding: 12px;
    }

    .notes-header {
        padding: 12px 16px;
    }

    .notes-title {
        font-size: 20px;
    }

    .notes-new-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .notes-card {
        padding: 16px;
    }

    .notes-card-actions {
        gap: 4px;
    }

    .notes-action-btn {
        width: 32px;
        height: 32px;
        padding: 6px;
        font-size: 14px;
    }
}
