/* Files page specific styles */

/* Full-width layout */
.files-layout {
    display: flex;
    height: calc(100vh - 60px);
    background: #f5f7fa;
}

/* Sidebar */
.files-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e1e8ed;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-section {
    padding: 16px 0;
}

.sidebar-title {
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    position: relative;
}

.sidebar-item:hover {
    background: #f5f7fa;
}

.sidebar-item.active {
    background: #e8f4fd;
    color: #0066cc;
    font-weight: 600;
}

.sidebar-item.active-section {
    background: #f5f7fa;
}

.sidebar-item svg {
    flex-shrink: 0;
}

.sidebar-item span {
    flex: 1;
}

.sidebar-item .chevron {
    margin-left: auto;
}

.sidebar-sub-item {
    padding-left: 48px;
    font-size: 13px;
    color: #666;
}

.sidebar-sub-item svg {
    width: 16px;
    height: 16px;
}

.sidebar-sub-item:hover {
    background: #f5f7fa;
    color: #0066cc;
}

.sidebar-sub-item.active {
    background: #e8f4fd;
    color: #0066cc;
    font-weight: 600;
}

.sidebar-item-loading,
.sidebar-item-empty {
    padding: 10px 20px;
    color: #999;
    font-size: 13px;
    font-style: italic;
}

/* Main Content Area */
.files-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: white;
}

/* Files content wrapper - scrollable */
#filesContent {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

#filesLoading,
#filesEmpty,
#filesError {
    padding: 24px;
}

/* Search Bar */
.files-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid #e1e8ed;
    background: white;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper svg {
    position: absolute;
    left: 12px;
    color: #999;
}

.search-input-wrapper input {
    width: 100%;
    padding: 10px 12px 10px 42px;
    border: 1px solid #e1e8ed;
    border-radius: 0;
    font-size: 14px;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #0066cc;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e1e8ed;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-toggle-btn:hover {
    background: #f5f7fa;
    border-color: #0066cc;
}

/* Storage Info */
.storage-info {
    padding: 24px;
    border-bottom: 1px solid #e1e8ed;
    background: white;
}

.storage-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.storage-header h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.bucket-badge {
    padding: 4px 10px;
    background: #e8f4fd;
    color: #0066cc;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
}

.storage-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.storage-used {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.storage-total {
    font-size: 16px;
    color: #999;
    font-weight: 400;
}

.storage-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.storage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066cc 0%, #0052a3 50%, #dc3545 100%);
    transition: width 0.3s;
}

.storage-breakdown {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.storage-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.storage-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Filters Panel */
.filters-panel {
    padding: 16px 24px;
    background: #f5f7fa;
    border-bottom: 1px solid #e1e8ed;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
    gap: 16px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-field label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.filter-field select {
    padding: 8px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 0;
    font-size: 14px;
    background: white;
    width: 100%;
}

.clear-filters-btn {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.clear-filters-btn:hover {
    background: #5a6268;
}

.search-scope-info {
    font-size: 11px;
    color: #0066cc;
    font-weight: 600;
    margin-top: 4px;
}

.search-scope-info-inline {
    font-size: 11px;
    color: #0066cc;
    font-weight: 600;
    margin-left: 6px;
    font-weight: normal;
}

/* Breadcrumb */
.breadcrumb {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
    background: white;
    border-bottom: 1px solid #e1e8ed;
}

.breadcrumb-item {
    color: #0066cc;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    transition: background 0.2s;
}

.breadcrumb-item:hover {
    background: #f5f7fa;
}

.breadcrumb-separator {
    color: #999;
    margin: 0 4px;
}

/* Files Count */
.files-count {
    padding: 12px 24px;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #e1e8ed;
}

/* Files Table Container */
.files-table-wrapper {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Files Table */
.files-table {
    width: 100%;
    border-collapse: collapse;
}

.files-table thead {
    background: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.files-table th {
    text-align: left;
    padding: 10px 24px;
    font-weight: 600;
    color: #666;
    font-size: 12px;
    border-bottom: 1px solid #e1e8ed;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.files-table td {
    padding: 10px 24px;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.files-table tbody {
    background: white;
}

.files-table tr:hover {
    background: #f9fafb;
}

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

.download-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

.download-link:hover {
    text-decoration: underline;
}

.error-message {
    padding: 16px 24px;
    background: #fee;
    color: #c33;
    border-radius: 0;
    margin: 16px 24px;
    border: 1px solid #fcc;
}

.empty-state {
    padding: 60px 24px;
    text-align: center;
    color: #999;
    font-size: 16px;
}

.alert {
    display: none;
    padding: 12px 24px;
    margin: 12px 24px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.file-path {
    font-size: 11px;
    color: #999;
    font-weight: normal;
    display: block;
    margin-top: 2px;
}

/* Folder styling */
.folder-row {
    cursor: pointer;
}

.folder-row:hover {
    background: #f0f8ff !important;
}

.folder-name {
    color: #0066cc;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.folder-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* File preview styling */
.file-row-clickable {
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-row-clickable:hover {
    background: #f0f8ff !important;
}

.preview-indicator {
    color: #0066cc;
    font-weight: 600;
    font-size: 13px;
}

.file-pin-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 4px;
    margin-right: 4px;
}

.file-pin-btn:hover {
    background: #fff3cd;
    color: #ffc107;
}

.file-pin-btn.pinned {
    color: #ffc107;
}

.file-pin-btn.pinned:hover {
    background: #f8d7da;
    color: #dc3545;
}

.file-pin-btn svg {
    display: block;
}

.file-download-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border-radius: 4px;
}

.file-download-btn:hover {
    background: #f5f7fa;
    color: #0066cc;
}

.file-download-btn svg {
    display: block;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 24px;
    border-top: 1px solid #e1e8ed;
    background: white;
    flex-shrink: 0;
}

.pagination-btn {
    padding: 8px 16px;
    background: #f5f7fa;
    color: #333;
    border: 1px solid #e1e8ed;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 70px;
}

.pagination-btn:hover:not(:disabled) {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 4px;
    align-items: center;
}

.page-btn {
    padding: 8px 12px;
    background: #f5f7fa;
    color: #333;
    border: 1px solid #e1e8ed;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 40px;
}

.page-btn:hover:not(.active) {
    background: #e1e8ed;
}

.page-btn.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.pagination-info {
    margin-left: 16px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* File Preview Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.modal-content {
    background-color: #fff;
    margin: 2% auto;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    font-weight: 300;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    flex: 1;
    overflow: auto;
    padding: 24px;
    background: #f5f7fa;
}

.loading-preview {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Preview content styles */
.preview-docx {
    background: #fff;
    padding: 20px;
    min-height: 400px;
}

.preview-csv {
    background: #fff;
}

.preview-msg {
    background: #fff;
    padding: 20px;
    border: 1px solid #e1e8ed;
}

.msg-header-info {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e8ed;
}

.msg-header-info div {
    margin-bottom: 8px;
    font-size: 14px;
}

.msg-header-info strong {
    display: inline-block;
    width: 80px;
    color: #666;
}

.msg-body-content {
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

/* Full MSG display styles from component.html */
.msg {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fff;
    border: 1px solid #e1e8ed;
    padding: 0;
    flex: 1;
    overflow: hidden;
}

.msg-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f5f7fa;
    border-bottom: 1px solid #e1e8ed;
}

.flex-b {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg-close-btn {
    background: #f5f7fa;
    border: 1px solid #e1e8ed;
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 24px;
    line-height: 1;
}

.msg-close-btn:hover {
    background: #e1e8ed;
}

.msg-divider {
    height: 1px;
    background-color: #e1e8ed;
    margin: 8px 0;
}

.msg-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.msg-date {
    font-size: 13px;
    color: #666;
}

.msg-recip-section,
.msg-attach-section,
.msg-embedded-section {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: start;
    font-size: 14px;
}

.msg-content {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e1e8ed;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #333;
    line-height: 1.6;
}

.color-text-2 {
    color: #666;
    font-weight: 600;
}

.msg-recip {
    font-size: 14px;
    color: #333;
    padding: 4px 0;
    line-height: 1.5;
}

.msg-attach-btn {
    padding: 6px 12px;
    background: #06c;
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px;
    border-radius: 0;
    transition: background 0.2s, transform 0.1s;
}

.msg-attach-btn:hover {
    background: #0052a3;
    transform: translateY(-1px);
}

.msg-attach-btn svg {
    width: 16px;
    height: 16px;
    fill: #fff;
    margin: 0;
}

.msg-embedded-btn {
    padding: 6px 12px;
    background: #6c757d;
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin: 4px;
    border-radius: 0;
    transition: background 0.2s, transform 0.1s;
}

.msg-embedded-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* PDF Preview */
.preview-pdf {
    background: #525659;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    overflow-y: auto;
}

.preview-pdf canvas {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: white;
    max-width: 100%;
    height: auto;
}

/* Image Preview */
.preview-image {
    background: #525659;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow: auto;
}

.preview-image img {
    max-width: 100%;
    max-height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background: white;
    object-fit: contain;
}

/* ==================== UPLOAD MODAL ==================== */

.btn-refresh {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f5f7fa;
    color: #333;
    border: 1px solid #e1e8ed;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: 0;
    transition: all 0.2s;
}

.btn-refresh:hover {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.btn-refresh:hover svg {
    stroke: white;
}

.btn-refresh svg {
    flex-shrink: 0;
}

.btn-upload {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #0066cc;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: 0;
    transition: background 0.2s;
}

.btn-upload:hover {
    background: #0052a3;
}

.btn-upload svg {
    flex-shrink: 0;
}

.upload-modal-content {
    max-width: 800px;
    max-height: 90vh;
}

/* Upload Destination Selection */
.upload-destination-section {
    padding: 24px;
    border-bottom: 1px solid #e1e8ed;
    background: #f8f9fa;
}

.upload-destination-section h4 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 16px;
    color: #333;
}

.destination-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.destination-option {
    cursor: pointer;
    position: relative;
}

.destination-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.option-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid #e1e8ed;
    border-radius: 0;
    background: white;
    transition: all 0.2s;
}

.destination-option:hover .option-content {
    border-color: #0066cc;
    background: #f8f9fa;
}

.destination-option input[type="radio"]:checked + .option-content {
    border-color: #0066cc;
    background: #e8f4fd;
}

.option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f5f7fa;
    border-radius: 50%;
    flex-shrink: 0;
}

.destination-option input[type="radio"]:checked ~ .option-content .option-icon {
    background: #0066cc;
}

.destination-option input[type="radio"]:checked ~ .option-content .option-icon svg {
    stroke: white;
}

.option-text {
    flex: 1;
}

.option-text strong {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.option-text small {
    display: block;
    font-size: 12px;
    color: #666;
}

.collection-select-section {
    margin-top: 16px;
    padding: 16px;
    background: white;
    border-radius: 0;
}

.collection-select-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.collection-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 0;
    font-size: 14px;
    background: white;
}

.collection-select:focus {
    outline: none;
    border-color: #0066cc;
}

.dropzone {
    border: 2px dashed #cbd5e0;
    border-radius: 0;
    padding: 48px 24px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 24px;
}

.dropzone:hover {
    border-color: #0066cc;
    background: #e8f4fd;
}

.dropzone.drag-over {
    border-color: #0066cc;
    background: #e8f4fd;
    border-style: solid;
}

.dropzone svg {
    color: #718096;
    margin-bottom: 16px;
}

.dropzone h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.dropzone p {
    font-size: 14px;
    color: #718096;
}

/* Upload Progress Section */
.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.upload-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.btn-cancel-all {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-cancel-all:hover {
    background: #c82333;
}

.btn-cancel-all:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.5;
}

.upload-files-table {
    border: 1px solid #e1e8ed;
    border-radius: 0;
    overflow: hidden;
    background: white;
}

.upload-files-table table {
    width: 100%;
    border-collapse: collapse;
}

.upload-files-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e1e8ed;
}

.upload-files-table td {
    padding: 12px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.upload-files-table tbody tr:last-child td {
    border-bottom: none;
}

.upload-file-name {
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-file-icon {
    width: 20px;
    height: 20px;
    color: #718096;
}

.upload-file-size {
    color: #666;
    font-size: 13px;
}

.upload-progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e8ed;
    border-radius: 0;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: #0066cc;
    border-radius: 0;
    transition: width 0.3s ease;
}

.upload-progress-text {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.upload-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.upload-status.pending {
    color: #718096;
}

.upload-status.uploading {
    color: #0066cc;
}

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

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

.upload-status svg {
    width: 16px;
    height: 16px;
}

/* Upload status icons */
.status-icon-pending {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==================== MOBILE RESPONSIVE STYLES ==================== */

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 8px 12px;
    margin-right: 12px;
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: #fff;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s ease;
}

body.menu-open .mobile-menu {
    display: flex;
    opacity: 1;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 36px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.mobile-menu-close:hover {
    color: #000;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    width: 100%;
    max-width: 300px;
}

.mobile-menu-link {
    color: #333;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    padding: 12px 24px;
    width: 100%;
    text-align: center;
    transition: background 0.2s;
}

.mobile-menu-link:hover {
    background: #f5f7fa;
}

.mobile-menu-link.active {
    color: #0066cc;
    font-weight: 600;
}

.mobile-menu-logout {
    padding: 12px 32px;
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.2s;
    margin-top: 16px;
}

.mobile-menu-logout:hover {
    background: #c82333;
}

/* Accordion Styles */
.accordion {
    border-top: 1px solid #e1e8ed;
}

.accordion:first-child {
    border-top: none;
}

.accordion-header {
    width: 100%;
    padding: 14px 20px;
    text-align: left;
    background: #fafafa;
    border: none;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #f5f7fa;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.accordion-chevron {
    transition: transform 0.25s ease;
    color: #666;
}

.accordion.open .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-content {
    display: none;
    transition: max-height 0.25s ease;
}

.accordion.open .accordion-content {
    display: block;
}

/* Bottom Navigation Bar */
.bottom-nav {
    display: none;
}

/* Mobile Responsive Breakpoints */
@media (max-width: 768px) {
    /* Hide hamburger menu toggle on desktop */
    .menu-toggle {
        display: block;
    }

    /* Hide desktop nav links on mobile */
    .navbar-right {
        display: none;
    }

    /* Files Layout Adjustments */
    .files-layout {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 60px - 70px); /* Account for navbar and bottom nav */
    }

    /* Sidebar Full Width on Mobile */
    .files-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e1e8ed;
        max-height: none;
    }

    /* Remove sidebar section padding */
    .sidebar-section {
        padding: 0;
    }

    .sidebar-title {
        display: none;
    }

    /* Adjust sidebar items */
    .sidebar-item {
        padding: 12px 20px;
    }

    /* Main Content Full Width */
    .files-main {
        flex: 1;
        padding-bottom: 70px; /* Space for bottom nav */
    }

    /* Search Bar Adjustments */
    .files-search-bar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
    }

    .search-input-wrapper {
        flex: 1 1 100%;
        order: 1;
    }

    .btn-refresh,
    .btn-upload {
        flex: 1;
        order: 2;
        justify-content: center;
    }

    .filter-toggle-btn {
        flex: 1;
        order: 3;
        justify-content: center;
    }

    /* Storage Info */
    .storage-info {
        padding: 16px;
    }

    .storage-used {
        font-size: 24px;
    }

    /* Filters Panel */
    .filters-panel {
        padding: 12px 16px;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Breadcrumb */
    .breadcrumb {
        padding: 10px 16px;
        font-size: 12px;
        flex-wrap: wrap;
    }

    /* Files Count */
    .files-count {
        padding: 10px 16px;
    }

    /* Files Table - Stack Rows */
    .files-table {
        display: block;
    }

    .files-table thead {
        display: none;
    }

    .files-table tbody {
        display: block;
    }

    .files-table tr {
        display: flex;
        flex-direction: column;
        padding: 12px 16px;
        border-bottom: 1px solid #e1e8ed;
        gap: 8px;
    }

    .files-table td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        border: none;
    }

    .files-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        font-size: 12px;
        text-transform: uppercase;
    }

    /* File rows styling for mobile */
    .folder-row,
    .file-row-clickable {
        min-height: 44px; /* Minimum tap target size */
    }

    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        padding: 16px;
        gap: 8px;
    }

    .pagination-pages {
        order: 2;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }

    .pagination-info {
        order: 3;
        margin-left: 0;
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }

    /* File Preview Modal */
    .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .modal-header {
        padding: 16px;
    }

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

    .modal-body {
        padding: 16px;
    }

    /* Upload Modal */
    .upload-modal-content {
        width: 100%;
        height: 100vh;
        max-width: none;
        max-height: none;
    }

    .upload-destination-section {
        padding: 16px;
    }

    .destination-options {
        grid-template-columns: 1fr;
    }

    .dropzone {
        padding: 32px 16px;
    }

    /* Bottom Navigation */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        display: flex;
        justify-content: space-around;
        align-items: center;
        background: #fff;
        border-top: 1px solid #e1e8ed;
        padding: 8px 0;
        z-index: 100;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    }

    .bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #666;
        font-size: 11px;
        padding: 8px 12px;
        min-width: 60px;
        min-height: 44px; /* Minimum tap target */
        transition: color 0.2s;
        gap: 4px;
    }

    .bottom-nav a:hover,
    .bottom-nav a:active {
        color: #0066cc;
        background: #f5f7fa;
    }

    .bottom-nav svg {
        width: 20px;
        height: 20px;
    }

    .bottom-nav span {
        font-size: 10px;
        font-weight: 500;
    }

    /* Empty State */
    .empty-state {
        padding: 40px 16px;
        font-size: 14px;
    }

    /* Ensure body doesn't scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* Tablet Breakpoint (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .files-sidebar {
        width: 200px;
    }

    .sidebar-item {
        padding: 8px 16px;
        font-size: 13px;
    }

    .files-search-bar {
        padding: 12px 16px;
    }

    .storage-info {
        padding: 16px;
    }

    .files-table th,
    .files-table td {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Ensure smooth transitions */
* {
    transition-property: background, color, border-color, transform, opacity;
    transition-duration: 0.25s;
    transition-timing-function: ease;
}

/* Preserve transitions only for interactive elements */
button, a, .sidebar-item, .accordion-header, .accordion-chevron {
    transition: all 0.25s ease;
}
