* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #e0e0e6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #7D8FC3 0%, #5a6da3 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 28px;
    font-weight: 600;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Header Project Switcher */
.header-project-switcher {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-project-switcher.hidden {
    display: none;
}

.current-project-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.current-project-label {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.current-project-name {
    font-size: 13px;
    font-weight: 600;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-compact {
    padding: 4px 10px;
    font-size: 11px;
    min-height: 28px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.9);
    color: #7D8FC3;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.btn-compact:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.change-project-icon {
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info.hidden {
    display: none;
}

.user-info span {
    font-size: 14px;
}

/* ===========================
   Breadcrumb Navigation Styles
   =========================== */
.breadcrumb-container {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 0;
}

.breadcrumb-container.hidden {
    display: none;
}

.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    flex-wrap: wrap;
}

.breadcrumb-link {
    color: #7D8FC3;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.breadcrumb-link:hover {
    background: rgba(125, 143, 195, 0.1);
    color: #5a6da3;
}

.breadcrumb-separator {
    color: #adb5bd;
    font-weight: bold;
}

.breadcrumb-current {
    color: #495057;
    font-weight: 500;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb-icon {
    font-size: 16px;
}

main {
    padding: 40px;
}

.sign-in-section {
    text-align: center;
    padding: 60px 20px;
}

.sign-in-section h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.sign-in-section p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.sign-in-section.hidden {
    display: none;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    text-align: center;
    vertical-align: middle;
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, #7D8FC3 0%, #5a6da3 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(125, 143, 195, 0.4);
}

.btn-secondary {
    background: white;
    color: #7D8FC3;
    border: 1px solid #7D8FC3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    color: white;
    border: 1px solid #dc3545;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #a02834 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.loading-section.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7D8FC3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.file-metadata {
    background: #e0e0e6;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.file-metadata h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 20px;
}

.file-metadata p {
    color: #333;
    margin: 8px 0;
    font-size: 14px;
}

.file-metadata .sudb-id-display {
    font-size: 24px;
    font-weight: 600;
    color: #790A0E;
    margin: 15px 0;
    margin-top: 35px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-metadata .project-name-display {
    margin: 10px 0;
    padding: 10px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.file-metadata .project-name-display strong {
    font-weight: 600;
}

.file-metadata .project-name-value {
    font-style: italic;
}

.file-metadata .sudb-link,
.file-metadata .project-link {
    color: #7D8FC3;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.file-metadata .sudb-link:hover,
.file-metadata .project-link:hover {
    color: #5a6da3;
    border-bottom: 2px solid #7D8FC3;
}

.files-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.file-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.file-item-highlight {
    border: 3px solid #7D8FC3;
    background: linear-gradient(135deg, rgba(125, 143, 195, 0.15) 0%, rgba(125, 143, 195, 0.25) 100%);
    box-shadow: 0 0 0 4px rgba(125, 143, 195, 0.2), 0 8px 30px rgba(125, 143, 195, 0.4);
    position: relative;
}

.file-item-highlight::before {
    content: '📍 Linked File';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #7D8FC3;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(125, 143, 195, 0.3);
}

.file-item-pulse {
    animation: pulse 0.6s ease-in-out 4;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 6px rgba(125, 143, 195, 0.3), 0 12px 40px rgba(125, 143, 195, 0.5);
    }
}

.file-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.file-thumbnail {
    width: 100%;
    height: 150px;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.file-item:hover .file-thumbnail img {
    transform: scale(1.05);
}

.file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
    word-break: break-word;
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.file-details span {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}

.file-size {
    background: #BFDFF3;
    color: #333;
}

.file-category-badge {
    background: linear-gradient(135deg, #7D8FC3 0%, #5a6da3 100%);
    color: white;
    font-weight: 600;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(125, 143, 195, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.file-date {
    background: #D0E5DF;
    color: #333;
}

.file-type {
    background: #e0e0e6;
    color: #555;
    font-size: 11px;
}

.file-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.error-message {
    background: #790A0E;
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.error-message.hidden {
    display: none;
}

.files-section.hidden {
    display: none;
}

.hidden {
    display: none;
}

/* Large screens */
@media (min-width: 1200px) {
    .btn {
        padding: 14px 32px;
        font-size: 17px;
        min-height: 48px;
    }

    .btn-small {
        padding: 10px 20px;
        font-size: 15px;
        min-height: 40px;
    }

    .upload-files-btn {
        padding: 12px 20px;
        font-size: 15px;
        min-height: 44px;
    }

    .sign-in-section .btn-primary {
        padding: 16px 40px;
        font-size: 18px;
        min-height: 52px;
    }
}

/* Tablet and medium screens */
@media (max-width: 1024px) {
    .btn {
        padding: 13px 28px;
        font-size: 15px;
        min-height: 46px;
    }

    .btn-small {
        padding: 10px 18px;
        font-size: 13px;
        min-height: 38px;
    }

    .upload-files-btn {
        padding: 12px 18px;
        font-size: 14px;
        min-height: 42px;
    }

    .file-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Tablet adjustments - reduce button size when space gets tight */
@media (max-width: 900px) and (min-width: 768px) {
    .upload-files-btn {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 40px;
    }
}

/* Mobile responsive */
@media (max-width: 767px) {
    body {
        padding: 10px;
    }

    header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }

    header h1 {
        font-size: 24px;
    }

    /* Breadcrumb responsive styles */
    .breadcrumb {
        padding: 0 20px;
        font-size: 12px;
    }
    
    .breadcrumb-current {
        max-width: 150px;
    }

    main {
        padding: 20px;
    }

    .files-container {
        grid-template-columns: 1fr;
    }

    .sign-in-section {
        padding: 40px 20px;
    }

    .sign-in-section h2 {
        font-size: 24px;
    }

    .file-metadata {
        padding: 20px;
        padding-top: 80px;
    }

    .upload-files-btn {
        position: absolute;
        top: 20px;
        left: 20px;
        right: 20px;
        width: calc(100% - 40px);
        margin: 0;
        display: block;
        justify-content: center;
        padding: 16px 24px;
        font-size: 16px;
        min-height: 50px;
    }

    /* Improve button sizing for mobile */
    .btn {
        padding: 14px 24px;
        font-size: 16px;
        min-height: 48px;
        touch-action: manipulation;
    }

    .btn-small {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 44px;
    }

    /* File action buttons stack vertically on mobile */
    .file-actions {
        flex-direction: column;
        gap: 10px;
    }

    .file-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Modal footer buttons on mobile */
    .upload-modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .upload-modal-footer .btn {
        width: 100%;
        justify-content: center;
        order: 2;
    }

    .upload-modal-footer .btn-secondary {
        order: 1;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    header {
        padding: 15px;
    }

    header h1 {
        font-size: 20px;
    }

    /* Breadcrumb mobile responsive styles */
    .breadcrumb {
        padding: 0 15px;
        overflow-x: auto;
        white-space: nowrap;
    }

    main {
        padding: 15px;
    }

    .file-metadata {
        padding: 15px;
        padding-top: 75px;
        margin-bottom: 25px;
    }

    .upload-files-btn {
        position: absolute;
        top: 15px;
        left: 15px;
        right: 15px;
        width: calc(100% - 30px);
        font-size: 16px;
        padding: 16px 20px;
        min-height: 50px;
        border-radius: 8px;
        margin: 0;
    }

    .user-info {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        padding: 16px 24px;
        font-size: 16px;
        min-height: 50px;
        border-radius: 8px;
    }

    .btn-small {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 46px;
        border-radius: 6px;
    }

    /* Ensure adequate spacing between buttons */
    .file-actions {
        gap: 12px;
    }

    /* Sign in button gets extra prominence on small screens */
    .sign-in-section .btn-primary {
        padding: 18px 32px;
        font-size: 18px;
        min-height: 54px;
        border-radius: 10px;
    }

    .sign-in-section {
        padding: 30px 15px;
    }
}

/* Upload Modal Styles */
.upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.upload-modal.hidden {
    display: none;
}

.upload-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.upload-modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.upload-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-modal-btn:hover {
    background: #e9ecef;
    color: #333;
}

.upload-modal-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.upload-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
}

/* Upload Drop Zone */
.upload-drop-zone {
    border: 2px dashed #7D8FC3;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9ff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-drop-zone:hover {
    border-color: #5a6da3;
    background: #f0f4ff;
}

.upload-drop-zone.drag-over {
    border-color: #5a6da3;
    background: #e8f0ff;
    transform: scale(1.02);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.drop-zone-icon {
    font-size: 48px;
    opacity: 0.7;
}

.drop-zone-text p {
    margin: 0;
    color: #333;
}

.drop-zone-text .drop-zone-hint {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.file-select-btn {
    background: none;
    border: none;
    color: #7D8FC3;
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
    padding: 0;
}

.file-select-btn:hover {
    color: #5a6da3;
}

.hidden-file-input {
    display: none;
}

/* Upload Files List */
.upload-files-list {
    margin-top: 30px;
}

.upload-files-list h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.upload-files-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upload-file-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.upload-file-icon {
    font-size: 24px;
    min-width: 30px;
}

.upload-file-info {
    flex: 1;
    min-width: 0;
}

.upload-file-name {
    font-weight: 500;
    color: #333;
    word-break: break-word;
}

.upload-file-size {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.upload-file-category {
    min-width: 150px;
}

.upload-file-category select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.upload-file-category select:focus {
    outline: none;
    border-color: #7D8FC3;
    box-shadow: 0 0 0 2px rgba(125, 143, 195, 0.2);
}

.upload-file-actions {
    display: flex;
    gap: 8px;
}

.upload-file-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.upload-file-remove:hover {
    background: #c82333;
}

.upload-file-progress {
    margin-top: 8px;
}

.upload-progress-bar {
    background: #e9ecef;
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
}

.upload-progress-fill {
    background: linear-gradient(90deg, #7D8FC3 0%, #5a6da3 100%);
    height: 100%;
    transition: width 0.3s ease;
    width: 0%;
}

.upload-file-status {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

.upload-file-status.success {
    color: #28a745;
}

.upload-file-status.error {
    color: #dc3545;
}

.upload-file-status.uploading {
    color: #7D8FC3;
}

/* Upload Error */
.upload-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
}

/* Upload Button */
.upload-files-btn {
    background: linear-gradient(135deg, #7D8FC3 0%, #5a6da3 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    top: 12px;
    right: 12px;
    box-shadow: 0 2px 4px rgba(125, 143, 195, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 10;
    min-height: 44px;
    line-height: 1.2;
    text-align: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.upload-files-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(125, 143, 195, 0.4);
    background: linear-gradient(135deg, #6a7fb8 0%, #4f6090 100%);
}

.upload-files-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.upload-files-btn:focus {
    outline: 2px solid #BFDFF3;
    outline-offset: 2px;
}



.upload-files-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(125, 143, 195, 0.3);
}

/* Mobile responsiveness for upload modal */
@media (max-width: 767px) {
    .upload-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .upload-modal-header,
    .upload-modal-body,
    .upload-modal-footer {
        padding: 20px;
    }
    
    .upload-drop-zone {
        padding: 30px 15px;
    }
    
    .upload-file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .upload-file-category {
        min-width: unset;
    }
    
    .upload-modal-footer {
        flex-direction: column;
        gap: 12px;
    }

    .upload-modal-footer .btn {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        min-height: 50px;
        justify-content: center;
    }

    /* Remove button styling for mobile */
    .upload-file-remove {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 40px;
        border-radius: 6px;
        width: 100%;
    }

    /* Close button */
    .close-modal-btn {
        width: 36px;
        height: 36px;
        font-size: 28px;
    }

    /* File select button */
    .file-select-btn {
        font-size: 16px;
        padding: 4px 8px;
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    .upload-modal-content {
        width: 98%;
        margin: 1%;
        max-height: 95vh;
        border-radius: 8px;
    }

    .upload-modal-header,
    .upload-modal-body,
    .upload-modal-footer {
        padding: 16px;
    }

    .upload-modal-header h3 {
        font-size: 20px;
    }

    .upload-modal-footer .btn {
        padding: 18px 24px;
        font-size: 17px;
        min-height: 52px;
        border-radius: 8px;
        font-weight: 600;
    }

    .upload-drop-zone {
        padding: 30px 15px;
        border-radius: 8px;
    }

    .drop-zone-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }

    .drop-zone-text p {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .drop-zone-hint {
        font-size: 14px !important;
    }

    .file-select-btn {
        font-size: 16px;
        padding: 6px 12px;
        border-radius: 6px;
        font-weight: 600;
    }

    /* Make upload file items more touch-friendly */
    .upload-file-item {
        padding: 15px;
        border-radius: 8px;
    }

    .upload-file-remove {
        min-height: 46px;
        font-size: 15px;
        padding: 12px 18px;
        border-radius: 6px;
    }
}

/* Extra small screens (phones in portrait, 360px and below) */
@media (max-width: 360px) {
    body {
        padding: 3px;
    }

    header {
        padding: 12px;
    }

    header h1 {
        font-size: 18px;
    }

    main {
        padding: 12px;
    }

    .file-metadata {
        padding: 12px;
        padding-top: 70px;
    }

    .upload-files-btn {
        position: absolute;
        top: 12px;
        left: 12px;
        right: 12px;
        width: calc(100% - 24px);
        font-size: 15px;
        padding: 14px 16px;
        min-height: 48px;
        margin: 0;
    }

    .upload-modal-content {
        width: 100%;
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .upload-modal-header,
    .upload-modal-body,
    .upload-modal-footer {
        padding: 12px;
    }

    .upload-modal-header h3 {
        font-size: 18px;
    }

    .upload-drop-zone {
        padding: 20px 10px;
    }

    .drop-zone-text p {
        font-size: 14px;
    }

    .drop-zone-hint {
        font-size: 12px !important;
    }

    .file-select-btn {
        font-size: 14px;
        padding: 4px 8px;
    }
}

/* Project Selection Styles */
.project-selection-section {
    text-align: center;
    padding: 60px 20px;
}

.project-selection-section.hidden {
    display: none;
}

.project-selection-section h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

.project-selection-section p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.project-selector-container {
    max-width: 500px;
    margin: 0 auto 20px;
}

.project-selector-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #333;
    text-align: left;
}

.project-selector {
    width: 100%;
    min-height: 45px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.project-selector:focus {
    border-color: #7D8FC3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(125, 143, 195, 0.1);
}

.project-selector:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.project-error {
    color: #e74c3c;
    margin-top: 10px;
    padding: 10px;
    background-color: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    display: block;
}

.project-error.hidden {
    display: none;
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    height: 45px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 41px;
    padding-left: 15px;
    font-size: 16px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 41px;
    right: 10px;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #7D8FC3;
    box-shadow: 0 0 0 3px rgba(125, 143, 195, 0.1);
}

.select2-dropdown {
    border: 2px solid #7D8FC3;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #7D8FC3;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
}

/* Project Switcher Modal */
.project-switcher-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.project-switcher-modal.hidden {
    display: none;
}

.project-switcher-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.project-switcher-modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-switcher-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.project-switcher-modal-body {
    padding: 25px 30px;
}

.project-switcher-modal-body p {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.project-switcher-selector-container {
    margin-bottom: 15px;
}

.project-switcher-selector-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    text-align: left;
    font-size: 14px;
}

.project-switcher-selector {
    width: 100%;
    min-height: 45px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.project-switcher-selector:focus {
    border-color: #7D8FC3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(125, 143, 195, 0.1);
}

.project-switcher-error {
    color: #e74c3c;
    margin-top: 10px;
    padding: 10px;
    background-color: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    font-size: 14px;
}

.project-switcher-error.hidden {
    display: none;
}

.project-switcher-modal-footer {
    padding: 20px 30px 25px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Floating Action Button */
.project-switch-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #7D8FC3 0%, #5a6da3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(125, 143, 195, 0.4);
    transition: all 0.3s ease;
    z-index: 100;
}

.project-switch-fab.hidden {
    display: none;
}

.project-switch-fab:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 25px rgba(125, 143, 195, 0.6);
}

.fab-icon {
    font-size: 24px;
    color: white;
}

/* Breadcrumb in metadata */
.project-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #7D8FC3;
}

.breadcrumb-change-btn {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
    background: #7D8FC3;
    color: white;
    border: 1px solid #7D8FC3;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.breadcrumb-change-btn:hover {
    background: #6a7fb8;
    border-color: #6a7fb8;
    transform: translateY(-1px);
}

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

@media (max-width: 768px) {
    .project-selector-container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .project-selection-section {
        padding: 40px 15px;
    }
    
    .project-selection-section h2 {
        font-size: 24px;
    }

    .header-controls {
        flex-direction: column;
        gap: 10px;
        align-items: flex-end;
    }

    .header-project-switcher {
        order: -1;
    }

    .current-project-name {
        max-width: 150px;
    }

    .project-switcher-modal-content {
        width: 95%;
        margin: 20px;
    }

    .project-switcher-modal-header,
    .project-switcher-modal-body,
    .project-switcher-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .project-switch-fab {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .fab-icon {
        font-size: 20px;
    }
}
