/* ======================= PANEL ADMINISTRACYJNY - NOTATKI ======================= */

/* Zakładki */
.nav-tab-wrapper {
    margin-bottom: 20px;
}

.categories-management,
.notes-list-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
}

.category-form-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
}

.category-form-container h3 {
    margin-top: 0;
}

.categories-list {
    margin-top: 30px;
}

.notes-form-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.notes-form {
    max-width: 800px;
}

.notes-form-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.notes-form-actions .button {
    margin-right: 10px;
}

/* ======================= LISTA NOTATEK - ADMIN ======================= */

.notes-list-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
}

.notes-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
    align-items: center;
}

.notes-filters select,
.notes-filters input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.notes-filters input[type="text"] {
    min-width: 200px;
}

/* ======================= SIATKA NOTATEK - ADMIN ======================= */

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.note-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.note-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Priorytety - kolory lewej krawędzi */
.note-card.priority-urgent {
    border-left: 4px solid #dc3545;
}

.note-card.priority-high {
    border-left: 4px solid #fd7e14;
}

.note-card.priority-normal {
    border-left: 4px solid #6c757d;
}

.note-card.priority-low {
    border-left: 4px solid #28a745;
}

.note-header {
    margin-bottom: 15px;
}

.note-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.note-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.note-category {
    background: #007cba;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.note-priority {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

.note-priority.priority-urgent {
    background: #dc3545;
}

.note-priority.priority-high {
    background: #fd7e14;
}

.note-priority.priority-normal {
    background: #6c757d;
}

.note-priority.priority-low {
    background: #28a745;
}

.note-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 14px;
}

.note-tags {
    margin-bottom: 15px;
}

.note-tag {
    display: inline-block;
    background: #f0f0f1;
    color: #50575e;
    padding: 3px 8px;
    margin: 2px 4px 2px 0;
    border-radius: 10px;
    font-size: 11px;
    border: 1px solid #ddd;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.note-dates {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.note-dates small {
    color: #666;
    font-size: 12px;
}

.note-actions {
    display: flex;
    gap: 8px;
}

.note-actions .button-small {
    padding: 4px 8px;
    font-size: 12px;
}

/* ======================= HISTORIA NOTATEK ======================= */

.notes-history {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-top: 30px;
}

.notes-history h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* ======================= FRONTEND - STYLE CARDS (domyślny) ======================= */

.crypto-notes-frontend {
    margin: 20px 0;
}

.crypto-notes-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.note-card-frontend {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.note-card-frontend:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.note-card-frontend.priority-urgent {
    border-left: 4px solid #dc3545;
}

.note-card-frontend.priority-high {
    border-left: 4px solid #fd7e14;
}

.note-card-frontend.priority-normal {
    border-left: 4px solid #6c757d;
}

.note-card-frontend.priority-low {
    border-left: 4px solid #28a745;
}

.note-card-header {
    margin-bottom: 15px;
}

.note-card-header h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.note-card-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.note-card-category {
    background: #0073aa;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.note-card-priority {
    background: #666;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    text-transform: uppercase;
}

.note-card-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 14px;
}

.note-card-tags {
    margin-bottom: 15px;
}

.note-card-tag {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 3px 8px;
    margin: 2px 4px 2px 0;
    border-radius: 10px;
    font-size: 11px;
    border: 1px solid #dee2e6;
}

.note-card-footer {
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.note-card-footer small {
    color: #666;
    font-size: 12px;
}

/* ======================= FRONTEND - STYLE LIST ======================= */

.crypto-notes-list {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.note-list-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.note-list-item:last-child {
    border-bottom: none;
}

.note-list-item:hover {
    background-color: #f9f9f9;
}

.note-list-item.priority-urgent {
    border-left: 4px solid #dc3545;
}

.note-list-item.priority-high {
    border-left: 4px solid #fd7e14;
}

.note-list-item.priority-normal {
    border-left: 4px solid #6c757d;
}

.note-list-item.priority-low {
    border-left: 4px solid #28a745;
}

.note-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.note-list-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.note-list-category {
    background: #0073aa;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.note-list-item p {
    color: #555;
    line-height: 1.6;
    margin: 10px 0;
    font-size: 14px;
}

.note-list-tags {
    margin: 10px 0;
}

.note-list-tag {
    display: inline-block;
    background: #f8f9fa;
    color: #495057;
    padding: 2px 6px;
    margin: 2px 4px 2px 0;
    border-radius: 8px;
    font-size: 11px;
    border: 1px solid #dee2e6;
}

.note-list-item small {
    color: #666;
    font-size: 12px;
}

/* ======================= FRONTEND - STYLE MINIMAL ======================= */

.crypto-notes-minimal {
    background: #f9f9f9;
    border-radius: 5px;
    padding: 15px;
}

.note-minimal {
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.note-minimal:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.note-minimal.priority-urgent {
    border-left: 3px solid #dc3545;
    padding-left: 15px;
}

.note-minimal.priority-high {
    border-left: 3px solid #fd7e14;
    padding-left: 15px;
}

.note-minimal.priority-normal {
    border-left: 3px solid #6c757d;
    padding-left: 15px;
}

.note-minimal.priority-low {
    border-left: 3px solid #28a745;
    padding-left: 15px;
}

.note-minimal h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.note-minimal p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

/* ======================= RESPONSYWNOŚĆ ======================= */

@media screen and (max-width: 768px) {
    .notes-grid {
        grid-template-columns: 1fr;
    }
    
    .crypto-notes-cards {
        grid-template-columns: 1fr;
    }
    
    .notes-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .notes-filters select,
    .notes-filters input {
        width: 100%;
    }
    
    .note-card,
    .note-card-frontend {
        padding: 15px;
    }
    
    .note-footer,
    .note-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .note-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .note-meta,
    .note-card-meta {
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 480px) {
    .notes-form-container,
    .notes-list-container,
    .notes-history {
        padding: 15px;
    }
    
    .note-card,
    .note-card-frontend,
    .note-list-item {
        padding: 12px;
    }
    
    .note-title,
    .note-card-header h4,
    .note-list-header h4 {
        font-size: 16px;
    }
    
    .note-content,
    .note-card-content,
    .note-list-item p {
        font-size: 13px;
    }
}

/* ======================= ANIMACJE I EFEKTY ======================= */

.note-card,
.note-card-frontend,
.note-list-item {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.note-tag,
.note-card-tag,
.note-list-tag {
    transition: all 0.2s ease;
}

.note-tag:hover,
.note-card-tag:hover,
.note-list-tag:hover {
    background-color: #e9ecef;
    transform: scale(1.05);
}

/* ======================= FRONTEND LABELS - ENGLISH ======================= */

.crypto-notes-frontend .note-card-priority::before {
    content: attr(data-priority-label);
}

.crypto-notes-frontend .priority-urgent .note-card-priority::after {
    content: "Urgent";
}

.crypto-notes-frontend .priority-high .note-card-priority::after {
    content: "High";
}

.crypto-notes-frontend .priority-normal .note-card-priority::after {
    content: "Normal";
}

.crypto-notes-frontend .priority-low .note-card-priority::after {
    content: "Low";
}

/* ======================= ACCESSIBILITY ======================= */

.note-card:focus,
.note-card-frontend:focus,
.note-list-item:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.notes-filters select:focus,
.notes-filters input:focus {
    outline: 2px solid #0073aa;
    outline-offset: 1px;
}

/* ======================= PRINT STYLES ======================= */

@media print {
    .notes-filters,
    .note-actions,
    .notes-form-container {
        display: none !important;
    }
    
    .note-card,
    .note-card-frontend,
    .note-list-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 20px;
    }
    
    .crypto-notes-cards,
    .notes-grid {
        grid-template-columns: 1fr;
    }
}