/* File Browser Main Container */
.browse-main {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* File Navigation */
.file-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.file-back-button {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    min-width: 80px;
    justify-content: center;
}

.file-back-button:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateX(-2px);
    text-decoration: none;
}

.file-folder-name {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 24px;
    flex: 1;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2c3e50;
    text-align: center;
}

.browse-cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* or space-between / center as needed */
    gap: 20px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    min-width:50%;
    height:50vh;
}



.browse-client-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width:100%;
    min-width:10%;
}

.browse-file-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 10vh;
    position: relative;
    cursor: pointer;
    max-width:100%;

}

.browse-file-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.browse-file-card::before {
    content: '';
    width: 20%;
    height: 5vh;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.file-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
    word-break: break-word;
    text-align: center;
    margin-top: auto;
}
.file-name a {
    text-decoration: none;
}

/* Delete Button */
.delete-button {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.delete-button:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* No Files Message */
.browse-main p {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    margin: 40px 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 40px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* File Action Buttons */
.file-action-buttons {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 0 0 12px 12px;
    max-width: 100%;
    margin: 0 auto;
}

.file-action-buttons form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.file-submit-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.file-submit-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.file-submit-group input[type="file"] {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    width: 100%;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.file-submit-group input[type="file"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.file-btn-save {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.file-btn-save:hover {
    background: #1e7e34;
    transform: translateY(-2px);
}

/* Folder Creation */
.folder-creation {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    max-width: 1200px;
    margin: 20px auto 0;
}

.folder-creation form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.folder-creation label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.folder-creation input[type="text"] {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.folder-creation input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.new-folder-btn {
    background: #fd7e14;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.new-folder-btn:hover {
    background: #e8590c;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .browse-main {
        padding: 15px;
    }

    .file-navigation {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .file-back-button {
        align-self: flex-start;
    }

    .browse-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
        padding: 20px;
    }

    .browse-file-card {
        padding: 15px;
        min-height: 100px;
    }

    .browse-file-card::before {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .file-name {
        font-size: 0.8rem;
    }

    .file-action-buttons,
    .folder-creation {
        padding: 20px;
    }

    .file-submit-group,
    .folder-creation form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .browse-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .file-navigation {
        padding: 10px 15px;
    }

    .file-folder-name {
        font-size: 1rem;
        padding: 10px 16px;
    }
}

.file-type-folder {
  background-color: #F7E6CA; /* Champagne */
}

.file-type-pdf {
  background-color: #FF8DA1; /* red */
}

.file-type-doc {
  background-color: #59B5F7; /* Royal BLue */
}

.file-type-txt {
  background-color: #D3D3D3; /* gray */
}

.file-type-spreadsheet {
  background-color: #50C878; /* emerald */
}

.file-type-image {
  background-color: #FFC067; /* yellow */
}

.file-type-archive {
  background-color: #6d4c41; /* brown */
}

.file-type-video {
  background-color: #8e24aa; /* purple */
}

.file-type-audio {
  background-color: #00acc1; /* cyan */
}

.file-type-default {
  background-color: #90a4ae; /* light gray */
}

.file-card::before {
  content: "📚"; /* Default fallback */
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.file-type-default::before { content: "📚"; }
.file-type-folder::before { content: "📁"; }
.file-type-pdf::before { content: "📕"; }
.file-type-doc::before { content: "📘"; }
.file-type-txt::before { content: "📃"; }
.file-type-spreadsheet::before { content: "📊"; }
.file-type-image::before { content: "📷"; }
.file-type-archive::before { content: "🗜️"; }
.file-type-video::before { content: "📽️️"; }
.file-type-audio::before { content: "🎵"; }
