:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --background: #f8f9fa;
    --text: #2c3e50;
    --light-gray: #ecf0f1;
    --medium-gray: #bdc3c7;
    --dark-gray: #7f8c8d;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    
    /* Priority Colors */
    --priority-high: var(--danger);
    --priority-medium: var(--warning);
    --priority-low: var(--success);
}

/* Common Container Styles */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--background);
}

/* Base Styles */
body {
    background-color: var(--background);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--text);
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem;
    width: 100%;
    min-height: 100vh;
}

.kanban-column {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Column styling with icons */
#suggestions {
    background-color: white;
    position: relative;
}

#suggestions h2 {
    display: flex;
    align-items: center;
}

#suggestions h2::before {
    content: "💡";
    margin-right: 0.5rem;
    font-weight: bold;
}

#todo {
    background-color: white;
    position: relative;
}

#todo h2 {
    display: flex;
    align-items: center;
}

#todo h2::before {
    content: "📅";
    margin-right: 0.5rem;
    font-weight: bold;
}

#inprogress {
    background-color: white;
    border-left: 4px solid #ffc107;
    position: relative;
}

#inprogress h2 {
    display: flex;
    align-items: center;
}

#inprogress h2::before {
    content: "⏳";
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Special styling for the "done" column */
#done {
    background-color: #f2f8f5;
    border-left: 4px solid #198754;
    position: relative;
}

#done h2 {
    color: #198754;
    display: flex;
    align-items: center;
}

#done h2::before {
    content: "✓";
    margin-right: 0.5rem;
    font-weight: bold;
}

.kanban-column.drag-hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Special styling for when dragging over the done column */
#done.drag-hover {
    background-color: #e6f4ee;
    box-shadow: 0 0 15px rgba(25, 135, 84, 0.3);
    border-left: 4px solid #198754;
    transform: scale(1.01);
}

#done.drag-hover h2 {
    color: #0f5132;
}

#done.drag-hover h2::before {
    transform: scale(1.2);
}

.kanban-column h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.kanban-item {
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    margin-bottom: 0.75rem;
    border: 1px solid #eee;
    cursor: grab;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    position: relative;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background-color: rgba(255, 255, 255, 0.5);
}

/* iOS-specific styles */
@supports (-webkit-touch-callout: none) {
    .kanban-item {
        /* Additional iOS optimizations */
        will-change: transform;
        transform: translate3d(0, 0, 0);
    }
    
    .kanban-item.touch-hold {
        transform: scale(0.98) translate3d(0, 0, 0);
    }

    .kanban-item.touch-hold-active {
        transform: scale(0.95) translate3d(0, 0, 0);
        background-color: #f8f9fa;
    }
}

/* Styling for items in the done column */
#done-items .kanban-item {
    opacity: 0.85;
    background-color: #f9fcfa;
    border: 1px solid #e6f0eb;
    position: relative;
}

/* Hide the priority indicator in done items and replace with checkmark */
#done-items .kanban-item .priority-indicator {
    display: none;
}

#done-items .kanban-item h3 span:first-child::before {
    content: "✓";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    color: #198754;
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1;
    text-align: center;
}

#done-items .kanban-item .description,
#done-items .kanban-item .date {
    color: #6c757d;
}

#done-items .kanban-item:hover {
    opacity: 1;
    background-color: #f2f8f5;
    transform: scale(0.98);
}

.kanban-item .item-actions {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.kanban-item:hover .item-actions {
    opacity: 1;
}

.kanban-item .edit-button,
.kanban-item .delete-button {
    background: none;
    border: none;
    color: #6c757d;
    padding: 0.25rem;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.kanban-item .edit-button:hover {
    background-color: #e9ecef;
    color: #000;
}

.kanban-item .delete-button:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

.item-updated {
    animation: highlight 1s ease-out;
}

.item-new {
    animation: slideIn 0.3s ease-out;
}

.item-removed {
    animation: fadeOut 0.3s ease-out;
}

.item-moving {
    animation: moving 0.3s ease-in-out;
    opacity: 0.7;
}

.being-moved {
    position: relative;
    z-index: 100;
    /* Removed pointer-events: none to allow dragging items out of columns */
}

.item-placeholder {
    background-color: rgba(13, 110, 253, 0.1);
    border: 2px dashed #0d6efd;
    border-radius: 6px;
    height: 100px;
    margin-bottom: 0.75rem;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.9; }
    100% { opacity: 0.6; }
}

@keyframes moving {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@keyframes highlight {
    0% { 
        background-color: rgba(255, 243, 205, 0.5);
    }
    100% { 
        background-color: rgba(255, 255, 255, 0.5);
    }
}

/* Colored highlight animations for different users */
.kanban-item[data-user-color="#198754"].item-updated {
    animation: highlight-green 1s ease-out;
}
.kanban-item[data-user-color="#0d6efd"].item-updated {
    animation: highlight-blue 1s ease-out;
}
.kanban-item[data-user-color="#dc3545"].item-updated {
    animation: highlight-red 1s ease-out;
}
.kanban-item[data-user-color="#ffc107"].item-updated {
    animation: highlight-yellow 1s ease-out;
}

@keyframes highlight-green {
    0% { background-color: rgba(25, 135, 84, 0.3); }
    100% { background-color: rgba(25, 135, 84, 0.1); }
}
@keyframes highlight-blue {
    0% { background-color: rgba(13, 110, 253, 0.3); }
    100% { background-color: rgba(13, 110, 253, 0.1); }
}
@keyframes highlight-red {
    0% { background-color: rgba(220, 53, 69, 0.3); }
    100% { background-color: rgba(220, 53, 69, 0.1); }
}
@keyframes highlight-yellow {
    0% { background-color: rgba(255, 193, 7, 0.3); }
    100% { background-color: rgba(255, 193, 7, 0.1); }
}

@keyframes success-highlight {
    0% { 
        background-color: #d1e7dd; 
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(25, 135, 84, 0.4);
    }
    30% {
        background-color: #d1e7dd;
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(25, 135, 84, 0.4);
    }
    100% { 
        background-color: #f9fcfa; 
        transform: scale(1);
        box-shadow: none;
    }
}

/* Special animation for items newly added to done column */
#done-items .item-new,
#done-items .kanban-item.being-moved {
    animation: success-highlight 2s ease-out;
}

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

@keyframes fadeOut {
    from { 
        opacity: 1;
        transform: scale(1);
    }
    to { 
        opacity: 0;
        transform: scale(0.9);
    }
}

.kanban-item:active {
    cursor: grabbing;
    transform: scale(0.98);
}

/* Touch feedback styles */
.kanban-item.touch-hold {
    animation: touch-hold 0.5s linear;
}

.kanban-item.touch-dragging {
    opacity: 0.9;
    transform: scale(0.98);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

@keyframes touch-hold {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.97);
        background-color: #f8f9fa;
    }
    100% {
        transform: scale(0.95);
        background-color: #e9ecef;
    }
}

/* User color background - Calendar */
.fc-event[data-user-color="#198754"] { background-color: rgba(25, 135, 84, 0.1); }
.fc-event[data-user-color="#0d6efd"] { background-color: rgba(13, 110, 253, 0.1); }
.fc-event[data-user-color="#dc3545"] { background-color: rgba(220, 53, 69, 0.1); }
.fc-event[data-user-color="#ffc107"] { background-color: rgba(255, 193, 7, 0.1); }

/* User color background - Kanban */
.kanban-item[data-user-color="#198754"] { background-color: rgba(25, 135, 84, 0.1) !important; }
.kanban-item[data-user-color="#0d6efd"] { background-color: rgba(13, 110, 253, 0.1) !important; }
.kanban-item[data-user-color="#dc3545"] { background-color: rgba(220, 53, 69, 0.1) !important; }
.kanban-item[data-user-color="#ffc107"] { background-color: rgba(255, 193, 7, 0.1) !important; }

.kanban-item h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    position: relative;
}

/* Hover states */
.fc-event[data-user-color="#198754"]:hover { background-color: rgba(25, 135, 84, 0.15); }
.fc-event[data-user-color="#0d6efd"]:hover { background-color: rgba(13, 110, 253, 0.15); }
.fc-event[data-user-color="#dc3545"]:hover { background-color: rgba(220, 53, 69, 0.15); }
.fc-event[data-user-color="#ffc107"]:hover { background-color: rgba(255, 193, 7, 0.15); }

/* Kanban hover states */
.kanban-item[data-user-color="#198754"]:hover { background-color: rgba(25, 135, 84, 0.15) !important; }
.kanban-item[data-user-color="#0d6efd"]:hover { background-color: rgba(13, 110, 253, 0.15) !important; }
.kanban-item[data-user-color="#dc3545"]:hover { background-color: rgba(220, 53, 69, 0.15) !important; }
.kanban-item[data-user-color="#ffc107"]:hover { background-color: rgba(255, 193, 7, 0.15) !important; }

.kanban-item .date {
    font-size: 0.85rem;
    color: #666;
}

.kanban-item .description {
    font-size: 0.9rem;
    color: #444;
    margin: 0.5rem 0;
}

/* Office 365 Document Link Styling */
.description a[href*="sharepoint.com"],
.description a[href*="office.com"],
.description a[href*="microsoft.com"] {
    color: #2563eb;
    text-decoration: none;
    padding-left: 1.5rem;
    position: relative;
    display: inline-block;
    margin: 0.25rem 0;
}

.description a[href*="sharepoint.com"]:before,
.description a[href*="office.com"]:before,
.description a[href*="microsoft.com"]:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%232563eb"><path d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z"/></svg>') center/contain no-repeat;
}

.description a[href*="sharepoint.com"]:hover,
.description a[href*="office.com"]:hover,
.description a[href*="microsoft.com"]:hover {
    color: #1e40af;
    text-decoration: underline;
}

.content-type-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.content-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.3rem;
}

.content-type-icon i {
    font-size: 0.9rem;
}

/* Content type icon colors - all green as requested */
.content-type-icon i.bi-file-text,
.content-type-icon i.bi-camera-video,
.content-type-icon i.bi-mic {
    color: #198754;
}

/* Image indicator styling */
.image-indicator {
    display: inline-flex;
    align-items: center;
    background-color: #e9ecef;
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
    color: #495057;
    margin-left: 0.3rem;
}

.image-indicator i {
    margin-right: 0.25rem;
    color: #0d6efd;
}

.priority-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.priority-high .priority-indicator {
    background-color: var(--priority-high);
}

.priority-medium .priority-indicator {
    background-color: var(--priority-medium);
}

.priority-low .priority-indicator {
    background-color: var(--priority-low);
}

.add-form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.add-form .form-group {
    margin-bottom: 1rem;
}

.add-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.add-form input[type="text"],
.add-form input[type="date"],
.add-form textarea,
.add-form select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.add-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* Modal styles */
.modal-dialog {
    max-width: 900px !important;
    margin: 1.75rem auto;
}

.modal-content {
    border-radius: 8px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-body {
    padding: 2rem;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 2rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem 2rem;
}

/* Modal form styling */
.modal .form-group {
    margin-bottom: 1.5rem;
}

.modal .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.modal .form-control {
    padding: 0.75rem;
}

.modal textarea.form-control {
    min-height: 150px;
}

.modal .ql-editor {
    min-height: 150px;
}

/* Select2 custom styles */
.select2-container--bootstrap-5 {
    width: 100% !important;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
    border: 1px solid #ced4da;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: #e7f1ff;
    border: 1px solid #0d6efd;
    color: #0d6efd;
    padding: 0.25rem 0.5rem;
    margin: 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    margin-left: 0.5rem;
    border: none;
    background: none;
    color: #0d6efd;
    padding: 0 0.25rem;
    cursor: pointer;
    font-weight: bold;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #dc3545;
    background-color: transparent;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-color: #86b7fe;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.modal .content-type-checkboxes {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.modal .checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Image upload styles */
.image-dropzone {
    border: 2px dashed #ced4da;
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.image-dropzone:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.image-dropzone.drag-over {
    background-color: #e7f1ff;
    border-color: #0d6efd;
}

.dropzone-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.dropzone-message i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #0d6efd;
}

.image-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-preview-container {
    margin-top: 1rem;
}

.image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.image-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview .remove-image {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background-color: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #dc3545;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.image-preview .remove-image:hover {
    background-color: #dc3545;
    color: white;
}

/* Existing images grid */
.existing-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.existing-image {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}

.existing-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.existing-image.deleting {
    opacity: 0.7;
    pointer-events: none;
}

.existing-image.deleted {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.image-wrapper {
    position: relative;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
}

.image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.existing-image:hover .image-overlay {
    opacity: 1;
}

.delete-image-btn,
.view-image-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-image-btn {
    background-color: #dc3545;
    color: white;
}

.delete-image-btn:hover {
    background-color: #bb2d3b;
}

.view-image-btn {
    background-color: #0d6efd;
    color: white;
}

.view-image-btn:hover {
    background-color: #0a58ca;
}

.image-info {
    padding: 0.5rem;
}

.image-name {
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.image-size {
    font-size: 0.7rem;
}

.delete-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.existing-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.existing-image {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.existing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.existing-image .remove-image {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background-color: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #dc3545;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.existing-image .remove-image:hover {
    background-color: #dc3545;
    color: white;
}

.upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(0,0,0,0.1);
}

.upload-progress-bar {
    height: 100%;
    background-color: #0d6efd;
    transition: width 0.3s ease;
}

/* Item image gallery */
.item-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.item-image {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}

.item-image:hover {
    transform: scale(1.05);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* More indicator for multiple images */
.more-indicator {
    background-color: rgba(13, 110, 253, 0.1);
    border: 1px solid rgba(13, 110, 253, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-count {
    color: #0d6efd;
    font-weight: bold;
    font-size: 0.9rem;
}

/* CSS-based confetti animation */
@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--final-x, 100px), var(--final-y, 200px)) rotate(var(--final-rotate, 360deg));
    }
}

/* Image lightbox */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    margin: 0 auto;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

/* Floating action button */
.floating-action-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: none; /* Hidden by default, shown on mobile */
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: transform 0.2s, background-color 0.2s;
}

.floating-action-button i {
    font-size: 24px;
}

.floating-action-button:hover {
    transform: scale(1.1);
    background-color: #0b5ed7;
}

.floating-action-button:active {
    transform: scale(0.95);
}

/* Improved Navbar Styling */
.navbar {
    background: linear-gradient(to right, #ffffff, #f8f9fa) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem !important;
    transition: all 0.3s ease;
}

.navbar .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: #212529;
    transition: color 0.2s ease;
}

.navbar-brand:hover {
    color: #198754;
}

.d-flex.align-items-center.flex-wrap {
    gap: 0.5rem;
}

.d-flex.mb-2.mb-md-0.me-auto {
    gap: 0.75rem;
}

/* Improved button styling */
#toggleAddForm {
    background-color: #198754;
    border-color: #198754;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(25, 135, 84, 0.2);
}

#toggleAddForm:hover {
    background-color: #146c43;
    border-color: #146c43;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(25, 135, 84, 0.3);
}

#toggleAddForm:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(25, 135, 84, 0.2);
}

#toggleAddForm i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

#toggleAddForm:hover i {
    transform: rotate(90deg);
}

/* Improved select styling */
#sort-select {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    background-color: #fff;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="%23212529"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 0.75rem;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

#sort-select:hover {
    border-color: #b1bbc4;
}

#sort-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: none;
}

/* Improved dropdown styling */
.dropdown .btn-outline-secondary {
    border-color: #ced4da;
    color: #495057;
    background-color: #fff;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.dropdown .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #b1bbc4;
    color: #212529;
}

.dropdown .btn-outline-secondary:focus {
    box-shadow: 0 0 0 0.25rem rgba(108, 117, 125, 0.25);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    padding: 0.5rem 0;
    min-width: 10rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #212529;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.dropdown-item.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    font-weight: 500;
}

/* User section styling */
.user-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background-color: #f8f9fa;
    border-radius: 50px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.user-icon:hover {
    background-color: #e9ecef;
}

.user-icon i {
    color: #6c757d;
    font-size: 1.1rem;
}

.user-name {
    font-weight: 500;
    color: #495057;
    font-size: 0.875rem;
}

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-outline-danger i {
    font-size: 0.9rem;
}

/* Mobile styles */
@media (max-width: 767px) {
    .floating-action-button {
        display: flex; /* Show on mobile */
    }

    /* Modal mobile styles */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem) !important;
    }

    /* Select2 mobile styles */
    .select2-container .select2-selection--multiple {
        min-height: 100px;
    }

    .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
        font-size: 0.875rem;
        padding: 0.15rem 0.4rem;
    }

    .select2-container--bootstrap-5 .select2-dropdown {
        font-size: 0.875rem;
    }

    .select2-container--bootstrap-5 .select2-search__field {
        font-size: 0.875rem;
        height: 32px;
    }

    .select2-container--bootstrap-5 .select2-results__option {
        padding: 0.5rem;
    }

    /* Fix for Select2 modal positioning */
    .modal-open .select2-container--open {
        z-index: 1056 !important;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 1rem;
    }
    
    .kanban-board {
        display: block; /* Stack columns on mobile */
    }
    
    .kanban-column {
        margin-bottom: 1rem;
    }
    
    /* Improved mobile navbar */
    .navbar {
        padding: 0.25rem 0.5rem;
        height: auto;
        min-height: 48px;
    }
    
    .navbar .container-fluid {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 0.25rem 0;
        gap: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 0.9rem;
        margin-right: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        font-weight: 600;
        flex: 0 0 auto;
        order: 1;
    }
    
    /* Controls container */
    .d-flex.mb-2.mb-md-0.me-auto {
        order: 3;
        margin: 0 !important;
        flex: 1 1 100%;
        display: flex;
        justify-content: flex-start;
        gap: 0.5rem;
        margin-top: 0.25rem !important;
    }
    
    /* User controls container */
    .d-flex.align-items-center {
        order: 2;
        margin: 0;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    #toggleAddFormMobile {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        background-color: #198754;
        border-color: #198754;
        box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
    }
    
    #toggleAddFormMobile:active {
        transform: scale(0.95);
        box-shadow: 0 1px 4px rgba(25, 135, 84, 0.2);
    }
    
    #sort-select {
        width: auto !important;
        min-width: 80px;
        padding: 0.25rem 1.5rem 0.25rem 0.5rem;
        font-size: 0.75rem;
        height: 30px;
        margin: 0 !important;
    }
    
    .dropdown button {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        height: 30px;
        margin: 0 !important;
        display: flex;
        align-items: center;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        height: 30px;
    }
    
    .user-icon {
        padding: 0.25rem 0.5rem;
        margin: 0 !important;
        font-size: 0.75rem;
        height: 30px;
    }
    
    .user-name {
        font-size: 0.75rem;
    }
    
    .btn-outline-danger {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        height: 30px;
        margin: 0 !important;
    }
    
    .btn-outline-danger .d-none.d-md-inline {
        display: none !important;
    }
    
    /* Mobile styles for image grid */
    .existing-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .image-info {
        padding: 0.25rem;
    }
    
    .image-name {
        font-size: 0.7rem;
    }
    
    .image-size {
        font-size: 0.65rem;
    }
}

/* Archive Page Styles */
.archive-container {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.date-filter {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.date-filter label {
    color: var(--text);
    font-weight: 500;
}

.date-filter input[type="date"] {
    padding: 0.5rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
}

.stats-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.user-stat {
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.user-name {
    font-weight: 500;
    color: var(--text);
}

.stat-details {
    color: var(--dark-gray);
}

.stat-count {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary);
}

.archived-items {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.archive-item {
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.archive-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.archive-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.archive-item h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.1rem;
}

.archive-date {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.archive-item-details {
    color: var(--text);
}

.meta-info {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

/* Filter Container */
.filter-container.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.filter-container .card-title {
    color: #495057;
    font-size: 1.1rem;
}

.filter-container .form-check-input:checked {
    background-color: #198754;
    border-color: #198754;
}
