html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

:root {
    --primary: #1f6fe5;
    --primary-600: #1653ad;
    --primary-700: #0d3d7a;
    --primary-light: #4a9bff;
    --primary-lighter: #6bb0ff;
    --bg: #f7f9fc;
    --panel: #ffffff;
    --text: #18202f;
    --muted: #62708a;
    --border: #dbe2ef;
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-900: #1e3a8a;
    --green-50: #f0fdf4;
    --green-200: #bbf7d0;
    --green-900: #14532d;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text);
    font-size: 20px;
    transition: all 0.3s ease;
}

    .mobile-menu-toggle:hover {
        background: #f1f5fb;
        border-color: var(--primary);
    }

    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.brand {
    font-weight: 700;
    color: #0f172a;
    letter-spacing: .3px;
    font-size: 16px;
    white-space: nowrap;
}

.spacer {
    flex: 1;
}

.user {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}

    .user a {
        color: #0b58cc;
        text-decoration: none;
        white-space: nowrap;
    }

        .user a:hover {
            text-decoration: underline;
        }

/* Storage Info */
.storage-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 16px;
}

.storage-bar-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
}

.storage-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.storage-fill {
    height: 100%;
    background: linear-gradient(90deg, #1f6fe5, #4a9bff);
    transition: width 0.3s ease;
    border-radius: 999px;
}

    .storage-fill.warning {
        background: linear-gradient(90deg, #f59e0b, #fbbf24);
    }

    .storage-fill.critical {
        background: linear-gradient(90deg, #ef4444, #f87171);
    }

.storage-text {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 16px;
}

/* Breadcrumbs */
.breadcrumbs {
    color: var(--muted);
    margin-bottom: 12px;
    font-size: 16px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 8px;
}

    .breadcrumbs a {
        color: #0b58cc;
        text-decoration: none;
    }

        .breadcrumbs a:hover {
            text-decoration: underline;
        }

/* Action Buttons */
.actions {
    display: flex;
    gap: 10px;
    margin: 10px 0 16px;
    flex-wrap: wrap;
}

.btn, .btn-primary {
    border: 2px solid var(--blue-400);
    background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
    color: var(--blue-700);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--blue-400);
    background: white;
    color: var(--blue-600);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 44px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
    min-height: 38px;
    box-shadow: none;
}

    .btn:hover {
        background: linear-gradient(135deg, var(--blue-100), var(--blue-200));
        background: var(--blue-50);
        border-color: var(--blue-500);
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
    }

    .btn:active {
        transform: scale(0.98);
        box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
        box-shadow: none;
    }

.btn-primary {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    border-color: var(--blue-700);
    background: var(--blue-600);
    border-color: var(--blue-600);
    color: #fff;
    box-shadow: 0 4px 8px rgba(29, 78, 216, 0.3);
    box-shadow: 0 1px 3px rgba(29, 78, 216, 0.2);
}

    .btn-primary:hover {
        background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(29, 78, 216, 0.4);
    }

.btn-link {
    background: none;
    border: none;
    color: var(--blue-600);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .btn-link:hover {
        background: var(--blue-50);
        border-radius: 4px;
        color: var(--blue-700);
    }

/* Hidden utility */
.hidden {
    display: none;
}

.muted {
    color: var(--muted);
}

/* Search Section */
.search-section {
    text-align: center;
    margin-bottom: 16px;
}

.search-toggle-link {
    display: inline-flex;
    align-items: center;
    color: var(--blue-600);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: white;
    border: 1px solid var(--blue-300);
}

.search-toggle-link:hover {
    background: var(--blue-50);
    color: var(--blue-700);
    border-color: var(--blue-400);
    text-decoration: none;
}

.search-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.search-input-group {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--blue-300);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    min-height: 42px;
}

.search-input:focus {
    outline: none;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(31, 111, 229, 0.1);
}

.search-input::placeholder {
    color: var(--muted);
}

.btn-search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--blue-600);
    border: 2px solid var(--blue-600);
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 42px;
}

.btn-search:hover {
    background: var(--blue-700);
    border-color: var(--blue-700);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(29, 78, 216, 0.2);
}

.btn-search:active {
    transform: scale(0.98);
}

.search-close-link {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
}

.search-close-link:hover {
    color: var(--text);
    background: var(--bg);
    text-decoration: underline;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--green-50);
    border: 1px solid var(--green-200);
    border-radius: 6px;
    margin-bottom: 12px;
}

.search-results-header span {
    font-size: 14px;
    font-weight: 600;
    color: var(--green-900);
}

.search-results-header a {
    font-size: 13px;
    color: var(--blue-600);
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.search-results-header a:hover {
    background: white;
    color: var(--blue-700);
    text-decoration: underline;
}

/* Hidden utility */
.hidden {
    display: none;
}

.muted {
    color: var(--muted);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--blue-400);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    color: var(--blue-700);
    background: linear-gradient(135deg, var(--blue-50), #ffffff);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

    .drop-zone.drag {
        background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
        border-color: var(--blue-600);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    }

    .drop-zone p {
        margin: 0;
        font-size: 14px;
    }

/* File Table */
.file-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    table-layout: auto;
}

    .file-table th, .file-table td {
        padding: 12px 14px;
        border-bottom: 1px solid var(--border);
        text-align: left;
    }

    .file-table thead th {
        background: #f1f5fb;
        color: #18202f;
        font-weight: 600;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .file-table tbody tr:hover {
        background: #f9fbff;
    }

    .file-table tbody tr:last-child td {
        border-bottom: none;
    }

    .file-table a {
        color: var(--blue-600);
        text-decoration: none;
        word-break: break-word;
        transition: color 0.2s ease;
    }

        .file-table a:hover {
            color: var(--blue-700);
            text-decoration: underline;
        }

        .file-table a svg {
            transition: transform 0.2s ease;
        }

        .file-table a:hover svg {
            transform: scale(1.1);
        }

/* Auth Container */
.auth-container {
    max-width: 420px;
    margin: 80px auto;
    background: var(--panel);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

    .auth-container h1 {
        margin-top: 0;
    }

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

    .form-field input[type="text"],
    .form-field input[type="password"] {
        background: #ffffff;
        border: 1px solid var(--border);
        color: var(--text);
        padding: 10px 12px;
        border-radius: 8px;
        font-size: 14px;
        min-height: 44px;
    }

    .form-field input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(31, 111, 229, 0.1);
    }

.text-danger {
    color: #ff8080;
}

/* Uploads */
.uploads {
    margin: 12px 0 18px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
}

.upload-item {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
}

    .upload-item:last-child {
        border-bottom: none;
    }

    .upload-item .row {
        display: flex;
        justify-content: space-between;
        gap: 10px;
        align-items: center;
        flex-wrap: wrap;
    }

        .upload-item .row.small {
            font-size: 12px;
            color: var(--muted);
        }

    .upload-item .name {
        color: #18202f;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        word-break: break-word;
    }

    .upload-item .meta {
        color: var(--muted);
        white-space: nowrap;
    }

    .upload-item .progress {
        margin: 8px 0 4px;
        height: 8px;
        background: #eef3fd;
        border: 1px solid #d2def4;
        border-radius: 999px;
        overflow: hidden;
    }

        .upload-item .progress > span {
            display: block;
            height: 100%;
            background: linear-gradient(90deg, #1f6fe5, #4a9bff);
            width: 0%;
            transition: width .2s ease;
        }

    .upload-item.done .progress > span {
        background: linear-gradient(90deg, #2bb673, #4bd08d);
    }

    .upload-item.error .progress > span {
        background: linear-gradient(90deg, #c0392b, #e74c3c);
    }

/* Share Modal */
.modal-share {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-share-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-share-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

    .modal-share-header h2 {
        margin: 0;
        font-size: 20px;
        color: #1f2937;
    }

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .modal-close-btn:hover {
        background: #fee2e2;
        color: #dc2626;
    }

.modal-share-body {
    padding: 24px;
}

.share-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    word-break: break-word;
}

.form-group-share {
    margin-bottom: 16px;
}

    .form-group-share label {
        display: block;
        font-weight: 600;
        font-size: 14px;
        color: #374151;
        margin-bottom: 6px;
    }

.form-control-share {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    min-height: 44px;
}

    .form-control-share:focus {
        outline: none;
        border-color: #1f6fe5;
        box-shadow: 0 0 0 3px rgba(31, 111, 229, 0.1);
    }

.share-link-result {
    margin-top: 20px;
    padding: 16px;
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}

.share-link-box {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.share-link-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-family: monospace;
    background: white;
    word-break: break-all;
}

.btn-copy {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: white;
    border: 2px solid var(--blue-700);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-height: 44px;
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.3);
}

    .btn-copy:hover {
        background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(29, 78, 216, 0.4);
    }

.help-text-share {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

.modal-share-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.btn-secondary-share, .btn-primary-share {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid;
    transition: all 0.3s ease;
    min-height: 44px;
}

.btn-secondary-share {
    background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
    color: var(--blue-700);
    border-color: var(--blue-300);
}

    .btn-secondary-share:hover {
        background: linear-gradient(135deg, var(--blue-100), var(--blue-200));
        border-color: var(--blue-400);
        transform: translateY(-2px);
    }

.btn-primary-share {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: white;
    border-color: var(--blue-700);
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.3);
}

    .btn-primary-share:hover {
        background: linear-gradient(135deg, var(--blue-700), var(--blue-600));
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(29, 78, 216, 0.4);
    }

    .btn-primary-share:disabled {
        background: #9ca3af;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

/* Move Modal Specific Styles */
.folder-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 12px;
    background: var(--blue-50);
    border: 2px solid var(--blue-200);
    border-radius: 8px;
    margin-bottom: 12px;
}

.breadcrumb-btn {
    background: white;
    border: 1px solid var(--blue-300);
    color: var(--blue-700);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

    .breadcrumb-btn:hover {
        background: var(--blue-100);
        border-color: var(--blue-400);
        transform: translateY(-1px);
    }

    .breadcrumb-btn:active {
        transform: scale(0.98);
    }

.breadcrumb-separator {
    color: var(--blue-400);
    font-weight: 600;
    user-select: none;
}

.folder-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid var(--blue-200);
    border-radius: 8px;
    background: white;
}

.folder-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #374151;
}

    .folder-item:last-child {
        border-bottom: none;
    }

    .folder-item:hover {
        background: var(--blue-50);
        color: var(--blue-700);
    }

    .folder-item:active {
        background: var(--blue-100);
    }

.folder-list-loading,
.folder-list-empty,
.folder-list-error {
    padding: 24px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.folder-list-error {
    color: #ef4444;
}

.folder-list-empty {
    font-style: italic;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablets and smaller (768px and below) */
@media (max-width: 768px) {
    .topbar {
        padding: 12px 16px;
        gap: 8px;
    }

    .brand {
        font-size: 14px;
    }

    .storage-info {
        display: none;
    }

    .user {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        background: white;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        gap: 12px;
    }

        .user.mobile-open {
            display: flex;
        }

        .user a {
            width: 100%;
            padding: 8px 12px;
            border-radius: 6px;
            transition: background 0.2s ease;
        }

            .user a:hover {
                background: #f1f5fb;
                text-decoration: none;
            }

    .mobile-menu-toggle {
        display: block;
    }

    .container {
        padding: 0 12px;
        margin: 16px auto;
    }

    .breadcrumbs {
        font-size: 13px;
        -webkit-overflow-scrolling: touch;
    }

    .actions {
        gap: 8px;
    }

    .btn, .btn-primary {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        padding: 8px 12px;
        font-size: 13px;
        min-height: 36px;
    }

    .drop-zone {
        padding: 20px 16px;
    }

        .drop-zone p {
            font-size: 13px;
        }

    /* Make table scrollable horizontally on mobile */
    .file-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
    }

    .file-table {
        min-width: 600px;
    }

        .file-table th, .file-table td {
            padding: 10px 8px;
            font-size: 13px;
        }

        .file-table .actions-cell {
            position: relative;
        }

            .file-table .actions-cell .btn-link {
                font-size: 13px;
                padding: 6px 4px;
                margin-right: 4px;
            }

    .upload-item .name {
        font-size: 14px;
    }

    .auth-container {
        margin: 40px auto;
        padding: 20px;
    }

    .modal-share-content {
        max-height: 95vh;
    }

    .modal-share-header {
        padding: 16px 20px;
    }

        .modal-share-header h2 {
            font-size: 18px;
        }

    .modal-share-body {
        padding: 20px;
    }

    .modal-share-footer {
        padding: 12px 20px;
    }

    .btn-secondary-share, .btn-primary-share {
        flex: 1;
        min-width: 0;
    }

    .search-section {
        margin-bottom: 12px;
    }

    .search-toggle-link {
        font-size: 14px;
        padding: 8px 12px;
    }

    .search-input-group {
        max-width: 100%;
    }

    .search-input {
        font-size: 13px;
        min-height: 40px;
    }

    .btn-search {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 40px;
    }

    .search-results-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* Small mobile devices (480px and below) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .topbar {
        padding: 10px 12px;
    }

    .brand {
        font-size: 13px;
    }

    .container {
        padding: 0 8px;
        margin: 12px auto;
    }

    .breadcrumbs {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .actions {
        flex-direction: column;
        gap: 8px;
        gap: 6px;
    }

    .btn, .btn-primary {
        width: 100%;
        min-height: 38px;
    }

    .drop-zone {
        padding: 16px 12px;
    }

        .drop-zone p {
            font-size: 12px;
        }

    .file-table {
        font-size: 12px;
    }

        .file-table th, .file-table td {
            padding: 8px 6px;
        }

        .file-table .actions-cell .btn-link {
            display: block;
            margin-bottom: 4px;
            margin-right: 0;
        }

    .upload-item {
        padding: 8px 6px;
    }

        .upload-item .row {
            font-size: 12px;
        }

            .upload-item .row.small {
                font-size: 11px;
            }

    .auth-container {
        margin: 20px auto;
        padding: 16px;
    }

    .modal-share {
        padding: 8px;
    }

    .modal-share-header {
        padding: 12px 16px;
    }

        .modal-share-header h2 {
            font-size: 16px;
        }

    .modal-share-body {
        padding: 16px;
    }

    .modal-share-footer {
        padding: 10px 16px;
        flex-direction: column;
    }

    .btn-secondary-share, .btn-primary-share {
        width: 100%;
    }

    .search-input-group {
        flex-direction: column;
    }

    .btn-search {
        width: 100%;
        justify-content: center;
    }

    .search-results-header {
        padding: 10px 12px;
    }

    .search-results-header span {
        font-size: 13px;
    }
}

/* Large tablets and small desktops (between 768px and 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
    }

    .storage-bar-container {
        min-width: 150px;
    }

    .storage-text {
        font-size: 11px;
    }

    .user {
        font-size: 13px;
    }
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
    .btn, .btn-primary, .btn-link {
        min-height: 44px;
        min-width: 44px;
    }

    .form-control-share,
    .form-field input[type="text"],
    .form-field input[type="password"] {
        min-height: 44px;
    }

    .file-table a,
    .file-table .btn-link {
        padding: 8px;
        margin: 4px 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .file-table {
        border-width: 0.5px;
    }

        .file-table th, .file-table td {
            border-bottom-width: 0.5px;
        }
}

/* Landscape mobile orientation */
@media (max-height: 500px) and (orientation: landscape) {
    .topbar {
        position: sticky;
        padding: 8px 12px;
    }

    .container {
        margin: 8px auto;
    }

    .modal-share-content {
        max-height: 80vh;
    }
}

/* Print styles */
@media print {
    .topbar,
    .actions,
    .drop-zone,
    .file-table .actions-cell,
    .mobile-menu-toggle {
        display: none !important;
    }

    body {
        background: white;
    }

    .file-table {
        border: 1px solid #000;
    }
}

/* Move Page Styles */
.move-page-card {
    background: white;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.move-page-title {
    margin: 0 0 24px 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--blue-900);
}

.move-source-info {
    background: var(--blue-50);
    border: 1px solid var(--blue-200);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}

.move-info-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue-700);
    margin-bottom: 8px;
}

.move-source-item {
    font-size: 16px;
    color: var(--blue-900);
    display: flex;
    align-items: center;
}

.move-arrow {
    text-align: center;
    margin: 16px 0;
    color: var(--blue-500);
}

.move-form-group {
    margin-bottom: 24px;
}

.move-folder-tree {
    border: 1px solid var(--blue-200);
    border-radius: 6px;
    background: white;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.move-folder-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.15s;
    user-select: none;
}

    .move-folder-item:hover {
        background-color: var(--blue-50);
    }

    .move-folder-item.selected {
        background-color: var(--blue-100);
        color: var(--blue-900);
        font-weight: 500;
    }

.move-folder-icon {
    width: 16px;
    text-align: center;
    margin-right: 6px;
    font-size: 14px;
    font-weight: bold;
    color: var(--blue-600);
    font-family: monospace;
}

.move-folder-name {
    display: flex;
    align-items: center;
    flex: 1;
}

.move-folder-children {
    margin-left: 24px;
    display: none;
}

.move-selected-destination {
    background: var(--green-50);
    border: 1px solid var(--green-200);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 24px;
}

.move-destination-display {
    font-size: 16px;
    color: var(--green-900);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.move-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.move-btn-primary, .move-btn-secondary {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s;
}

.move-btn-primary {
    background: var(--blue-600);
    color: white;
}

    .move-btn-primary:hover:not(:disabled) {
        background: var(--blue-700);
    }

    .move-btn-primary:disabled {
        background: var(--blue-300);
        cursor: not-allowed;
        opacity: 0.6;
    }

.move-btn-secondary {
    background: white;
    color: var(--blue-700);
    border: 1px solid var(--blue-300);
}

    .move-btn-secondary:hover {
        background: var(--blue-50);
    }

.move-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
}

.move-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
}

.move-empty-state {
    text-align: center;
    padding: 48px 24px;
}

/* Move Page Mobile Responsive */
@media (max-width: 768px) {
    .move-page-card {
        padding: 20px;
    }

    .move-form-actions {
        flex-direction: column-reverse;
    }

    .move-btn-primary, .move-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Selection Toolbar */
.selection-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--blue-50), #fff);
    border: 1px solid var(--blue-200);
    border-radius: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.selection-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--blue-700);
    margin-right: 8px;
}

.btn-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--blue-300);
    border-radius: 6px;
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-toolbar:hover {
    background: var(--blue-50);
    border-color: var(--blue-500);
    transform: translateY(-1px);
}

.btn-toolbar:active {
    transform: scale(0.98);
}

.btn-toolbar-danger {
    border-color: #fca5a5;
    color: #dc2626;
}

.btn-toolbar-danger:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.btn-toolbar-text {
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toolbar-text:hover {
    color: var(--text);
    text-decoration: underline;
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--blue-600);
}

.file-row {
    transition: background-color 0.15s ease;
}

.file-row:has(.file-checkbox:checked) {
    background-color: var(--blue-50);
}

/* Responsive selection toolbar */
@media (max-width: 768px) {
    .selection-toolbar {
        padding: 10px 12px;
        gap: 6px;
    }

    .btn-toolbar {
        padding: 8px 10px;
        font-size: 12px;
    }

    .btn-toolbar svg {
        width: 12px;
        height: 12px;
    }

    .selection-count {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .selection-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .selection-count {
        text-align: center;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--blue-200);
        margin: 0;
    }

    .btn-toolbar {
        width: 100%;
        justify-content: center;
    }

    .btn-toolbar-text {
        width: 100%;
        text-align: center;
    }
}
