/* Modern Photo Sales App - Clean & Professional Design */

/* CSS Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2d3748;
    line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1a202c;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #2d3748;
}

h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #2d3748;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Container Layout */
.container, .main-content {
    max-width: 1500px;
    margin: 0 auto;
    padding: 2rem;
    background: #f7fafc;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Navigation and Back Links */
.back-link {
    display: inline-flex;
    align-items: center;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2rem;
    padding: 0.75rem 1rem;
    background: #f7fafc;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.back-link:hover {
    background: #edf2f7;
    color: #2d3748;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Project List (Index Page) */
.project-list {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.project-count {
    color: #718096;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.project-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Forms */
form.new-project {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Input Fields */
input[type="text"], input[type="number"], input[type="password"], textarea {
    font-family: inherit;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s ease;
    outline: none;
    min-width: 200px;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="password"]:focus, textarea:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

input[type="file"] {
    display: block;
    margin: 1rem auto;
}

.custom-file-label {
    display: none;
}

.custom-file-label:hover {
    display: none;
}

textarea {
    width: 100%;
    min-height: 80px;
    resize: vertical;
}

/* Buttons */
.button, button, .btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.button:hover, button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 153, 225, 0.4);
    text-decoration: none;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: 60px;
}

.btn-small:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button.delete, .delete-btn {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.3);
}

.button.delete:hover, .delete-btn:hover {
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

.button.blue, .btn-blue {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.button.green, .btn-green {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.button.green:hover, .btn-green:hover {
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

/* Sections */
.section {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #2d3748;
}

/* Simple vertical stack for project page */
.photo-list {
    display: block;
    margin-top: 2rem;
}
.group-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    padding: 1.2rem 2rem 1.5rem 2rem;
    border: none;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100vw;
    gap: 2.2rem;
}
.group-photo-list {
    display: flex;
    flex-direction: row;
    gap: 1.1rem;
    margin-bottom: 1.2rem;
    width: auto;
    flex-wrap: nowrap;
}
.group-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background: none;
    box-shadow: none;
    border: none;
    margin-bottom: 0;
    padding: 0;
}
.group-image-wrap {
    position: relative;
    width: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.group-image {
    width: 220px;
    height: auto;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(66,153,225,0.08);
}
.checkbox-wrap {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(255,255,255,0.92);
    border-radius: 6px;
    padding: 2px 7px 2px 2px;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    margin: 0;
    display: flex;
    align-items: center;
    opacity: 1 !important;
    visibility: visible !important;
}
.checkbox-wrap label {
    font-size: 0.9rem;
    margin-left: 0.3rem;
}
.group-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 220px;
    max-width: 700px;
    margin: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    align-self: stretch;
}
.group-fields .input-group,
.group-fields textarea,
.group-fields label,
.group-fields input {
    width: 100%;
    box-sizing: border-box;
}
.sold-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.item-card, .group-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.item-card:hover, .group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.item-card > div, .group-card > div {
    width: 100%;
}
.item-image, .group-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 2px solid #e2e8f0;
    transition: transform 0.2s ease;
}
.item-image:hover, .group-image:hover {
    transform: scale(1.05);
}
.item-details, .group-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.item-actions, .group-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Group Layout */
.group-photo-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1.2rem;
    border: none;
    background: none;
}

.group-info {
    color: #38a169;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ungroup-btn {
    background: #e2e8f0;
    color: #4a5568;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ungroup-btn:hover {
    background: #cbd5e0;
    color: #2d3748;
}

/* Form Elements */
.comment-box {
    width: 100%;
    margin-bottom: 0.5rem;
}

.price-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* Totals and Summary */
.totals {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.select-all {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
    display: block;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.select-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

/* Progress and Upload Info */
.upload-info, .progress-wrap {
    text-align: center;
    margin: 1rem 0;
    color: #4a5568;
}

progress {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
}

progress::-webkit-progress-bar {
    background: #e2e8f0;
    border-radius: 4px;
}

progress::-webkit-progress-value {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border-radius: 4px;
}

/* Preview Grid */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.preview-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.preview-single img {
    max-width: 200px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    margin: 1rem 0;
}

/* Viewer Page Specific */
.group {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.group:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.group img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 0;
}

.details {
    margin-top: 1rem;
}

.price-summary {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    margin: 0.5rem 0;
    border: 1px solid #e2e8f0;
}

.comment {
    background: #edf2f7;
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    border-left: 4px solid #4299e1;
}

/* Project Name Input */
#projectNameInput {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid transparent;
    background: transparent;
    color: #2d3748;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#projectNameInput:focus {
    border-color: #4299e1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

#saveStatus {
    color: #38a169;
    font-weight: 500;
    font-size: 0.9rem;
    display: none;
}

.update-status {
    color: #38a169;
    font-weight: 500;
    font-size: 0.9rem;
    margin-left: 10px;
    opacity: 1;
    transition: opacity 1s ease-out;
}

.input-group {
    display: flex;
    flex-direction: column;
}
.input-group label {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 0.25rem;
    text-align: left;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .container, .main-content {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .project-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .project-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .item-card, .group-card {
        padding: 1rem;
    }
    
    .item-image, .group-image {
        width: 100%;
        max-width: 200px;
        height: auto;
    }
    
    .group-photo-list {
        justify-content: center;
    }
    
    .price-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .button, button, .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Link actions responsive layout */
    .link-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        width: 100%;
    }
    
    .link-actions .button {
        width: 100%;
        margin-bottom: 0;
        text-align: center;
    }
    
    form.new-project {
        flex-direction: column;
        align-items: stretch;
    }
    
    input[type="text"], input[type="number"], input[type="password"], textarea {
        width: 100%;
        min-width: auto;
    }
    
    .group-photo {
        flex-direction: column;
        align-items: center;
    }
    
    /* Better mobile layout for project page */
    .group-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .group-actions .input-group {
        width: 100%;
    }
    
    .group-actions input[type="number"] {
        width: 100%;
        min-width: auto;
    }
    
    .group-actions .sold-label {
        margin-top: 0.5rem;
        text-align: center;
    }
    
    /* Carousel mobile improvements */
    .carousel-container {
        max-width: 100%;
    }
    
    .carousel-wrapper {
        height: 250px;
    }
    
    .carousel-btn {
        padding: 8px 12px;
        font-size: 16px;
    }
    
    /* Image viewer modal mobile */
    .image-viewer-content {
        margin: 2% auto;
        width: 98%;
        max-width: 98vw;
    }
    
    .group-photo-details {
        align-items: stretch;
        text-align: center;
        width: 100%;
        max-width: unset;
        margin: 0;
        flex: unset;
    }
    .group-image-wrap {
        align-items: center;
        width: 100%;
    }
    .group-image {
        display: block;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    .group-photo-details textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
        text-align: left;
        display: block;
    }
    .group-photo-details .delete-btn {
        display: block;
        margin: 1rem auto 0 auto;
        width: 90%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .container, .main-content {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .section {
        padding: 1rem;
    }
    
    .project-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .button, button, .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
    
    /* Stack link actions vertically on very small screens */
    .link-actions {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Login page mobile fixes */
    .login-container {
        margin: 0;
        padding: 1rem;
        border-radius: 0;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .login-form {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error States */
.success {
    background: #c6f6d5;
    border-color: #9ae6b4;
    color: #22543d;
}

.error {
    background: #fed7d7;
    border-color: #feb2b2;
    color: #742a2a;
}

/* Smooth Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.item-card, .group-card, .project-card {
    animation: fadeIn 0.3s ease-out;
}

.group-photo {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.group-photo:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.group-photo-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.group-image-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

/* Viewer Page Specific */
.viewer-photo-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    text-align: center;
}
.close-modal {
    color: #aaa;
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 2.2rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    z-index: 30;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    padding: 0 12px 2px 12px;
    transition: background 0.2s, color 0.2s;
}
.close-modal:hover {
    color: #222;
    background: #f1f1f1;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.carousel-btn-container {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 12;
    transform: translateY(-50%);
}

.carousel-btn {
    pointer-events: auto;
    background: rgba(30, 41, 59, 0.38);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
    opacity: 0.85;
    margin: 0 4px;
}
.carousel-btn:hover {
    background: rgba(30, 41, 59, 0.85);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    opacity: 1;
}
.carousel-arrow {
    font-size: 1.5rem;
    line-height: 1;
    pointer-events: none;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active {
    background: white;
}

/* Image Viewer Modal */
.image-viewer-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 95%;
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.image-viewer-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.modal-comment {
    padding: 1rem;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    font-style: italic;
    color: #4a5568;
}

/* Spinner */
.image-loading-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    margin-top: -20px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 20;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal carousel dots overlay */
.image-viewer-img-wrap .carousel-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 30;
  pointer-events: auto;
}

/* Floating Bulk Actions Bar (fixed to top) */
.bulk-actions.floating {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 100;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.bulk-actions.floating .bulk-actions-inner {
  background: #f7fafc;
  box-shadow: 0 8px 32px rgba(66,153,225,0.13), 0 2px 8px rgba(0,0,0,0.07);
  border-radius: 0 0 18px 18px;
  padding: 0.7rem 2.2rem;
  margin-top: 0;
  pointer-events: auto;
  display: flex;
  gap: 1.1rem;
  justify-content: center;
  align-items: center;
}
body.floating-bulk-bar {
  padding-top: 90px;
}
@media (max-width: 700px) {
  .bulk-actions-inner, .bulk-actions.floating .bulk-actions-inner {
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.7rem 0.5rem;
  }
  .bulk-actions .btn {
    min-width: 90vw;
    max-width: 95vw;
    width: 100%;
  }
  .photo-list {
    grid-template-columns: 1fr;
  }
  .group-photo-list {
    grid-template-columns: 1fr 1fr;
  }
  .group-image {
    width: 44vw;
    max-width: 98vw;
  }
}

/* Modern Input for Settings */
.modern-input {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  transition: all 0.2s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.2rem;
}
.modern-input:focus {
  border-color: #4299e1;
  box-shadow: 0 0 0 2px rgba(66,153,225,0.12);
}

/* User Table Styles */
.user-table {
  width: 100%;
  border-collapse: collapse;
  background: #f8fafc;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.user-table th, .user-table td {
  padding: 1rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}
.user-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #2d3748;
  border-bottom: 2px solid #e2e8f0;
}
.user-table tr:last-child td {
  border-bottom: none;
}
.user-table-row {
  background: #fff;
  transition: background 0.2s;
}
.user-table-row:hover {
  background: #f7fafc;
}
.user-row-admin {
  background: #f1f5f9 !important;
  color: #888;
}

/* Drag and Drop Styles */
.group-photo {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.group-photo.dragging {
    opacity: 0.5;
    transform: rotate(5deg) scale(1.05);
    z-index: 1000;
    position: relative;
}

.group-photo.drag-over {
    border: 2px dashed #4299e1;
    background: rgba(66, 153, 225, 0.1);
}

.photo-actions {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

/* Upload Progress Styles */
.upload-progress {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.upload-progress h4 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
    font-size: 1rem;
}

.upload-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #718096;
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #3182ce);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.bulk-actions .btn {
  min-width: 140px;
  max-width: 180px;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
  margin: 0 2px;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .group-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1.2rem;
    padding: 1.2rem 0.5rem 1.5rem 0.5rem;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  .group-fields,
  .update-form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .group-fields input,
  .group-fields textarea,
  .update-form input,
  .update-form textarea {
    font-size: 16px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .group-photo-list {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    min-width: 0;
    max-width: 100vw !important;
    width: 100vw !important;
    overflow-x: visible;
    padding-bottom: 0.5rem;
    box-sizing: border-box !important;
    margin-bottom: 1rem !important;
  }
  .group-image-wrap {
    min-width: 0;
    max-width: 100px !important;
    width: 100px !important;
    flex-shrink: 0;
    box-sizing: border-box !important;
    margin-bottom: 0.5rem;
    margin-right: 0.5rem;
  }
  .group-image {
    width: 100% !important;
    max-width: 100px !important;
    height: auto !important;
    box-sizing: border-box !important;
    margin-bottom: 0.5rem;
  }
  #projectTitle {
    display: block !important;
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
    text-align: center !important;
    width: 100vw !important;
    overflow-wrap: break-word !important;
  }
}

.bulk-actions {
  display: none;
}
.bulk-actions.floating {
  display: block;
}

.photo-list.grid-view .group-fields,
.photo-list.grid-view .detailed-view .group-photo-list {
  display: none !important;
}
.photo-list.grid-view .grid-minimized {
  display: block !important;
}
.grid-minimized .group-photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}
.grid-minimized .group-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  box-shadow: none;
  border: none;
  margin-bottom: 0;
  padding: 0;
}
.grid-minimized .group-image {
  width: 100px !important;
  max-width: 100px !important;
  height: auto !important;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.grid-minimized .checkbox-wrap {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(255,255,255,0.92);
  border-radius: 6px;
  padding: 2px 7px 2px 2px;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  margin: 0;
  display: flex;
  align-items: center;
  opacity: 1 !important;
  visibility: visible !important;
}
.grid-minimized .ungroup-btn {
  background: #e2e8f0;
  color: #4a5568;
  border: none;
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.3rem;
  transition: all 0.2s ease;
}
.grid-minimized .ungroup-btn:hover {
  background: #cbd5e0;
  color: #2d3748;
}

.photo-list.grid-view {
  display: none;
}
.photo-list.grid-view.active {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.photo-list.grid-view .group-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  box-shadow: none;
  border: none;
  margin-bottom: 0;
  padding: 0;
  position: relative;
}
.photo-list.grid-view .group-image {
  width: 160px !important;
  max-width: 160px !important;
  height: auto !important;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.photo-list.grid-view .checkbox-wrap {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255,255,255,0.95);
  border-radius: 8px;
  padding: 4px 8px 4px 4px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  margin: 0;
  display: flex;
  align-items: center;
  opacity: 1 !important;
  visibility: visible !important;
  border: 1px solid #e2e8f0;
}
.photo-list.grid-view .ungroup-btn {
  background: #e2e8f0;
  color: #4a5568;
  border: none;
  border-radius: 8px;
  padding: 0.3rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 0.3rem;
  transition: all 0.2s ease;
}
.photo-list.grid-view .ungroup-btn:hover {
  background: #cbd5e0;
  color: #2d3748;
}
