/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f9fafb;
    color: #111827;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: white;
    border-bottom: 2px solid #22c55e;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky; /* Keep header visible on scroll */
    top: 0;
    z-index: 999; /* Ensure header is above other content */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background-color: #22c55e;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.tagline {
    font-size: 0.875rem;
    color: #6b7280;
    display: none;
}

@media (min-width: 640px) {
    .tagline {
        display: inline;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.nav-link:hover {
    color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
}

.nav-link.active {
    color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
}

/* Auth Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-buttons .btn-ghost{
    padding: 0.5rem 1rem;
    text-decoration: none !important;
}


.auth-buttons .btn-primary {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    text-decoration: none;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    cursor: pointer;
    transition: transform 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    min-width: 200px;
    z-index: 100;
}

.user-info {
    padding: 1rem;
}

.user-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.user-email {
    font-size: 0.75rem;
    color: #6b7280;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.5rem 0;
}

.dropdown-item {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.dropdown-item:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Form Styles for Modals */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.form-input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    background-color: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background-color: #22c55e;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #16a34a;
}

.btn-ghost {
    background: transparent;
    color: #6b7280;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
    text-decoration: none !important;
}

.btn-ghost:hover {
    color: #22c55e;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Main Content */
.main {
    padding: 2rem 0;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Upload Card */
.upload-card {
    background: white;
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-card:hover {
    border-color: #22c55e;
    background-color: rgba(34, 197, 94, 0.02);
}

.upload-card.drag-hover {
    border-color: #22c55e;
    background-color: rgba(34, 197, 94, 0.05);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.upload-content {
    max-width: 400px;
    margin: 0 auto;
}

.upload-icon {
    width: 4rem;
    height: 4rem;
    background-color: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: #22c55e;
}

.upload-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-card p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.file-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.file-type {
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.file-limit {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

/* Files Card */
.files-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

.stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.stats strong {
    color: #22c55e;
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    position: relative;
}

.search-input i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-input input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.search-input input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.search-bar select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    min-width: 12rem;
}

/* Files List */
.files-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.file-item:hover {
    background-color: #f3f4f6;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.file-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(34, 197, 94, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
}

.file-details h5 {
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    background-color: #e5e7eb;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: #22c55e;
    font-weight: 500;
}

/* Admin Files Table */
.admin-files {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
    font-weight: 600;
    color: #6b7280;
    background-color: #f9fafb;
}

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

/* Upload Progress */
.upload-progress {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.upload-progress h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.progress-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.progress-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.progress-filename {
    font-weight: 500;
    flex: 1;
    margin-right: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-size {
    font-size: 0.75rem;
    color: #6b7280;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: #22c55e;
    transition: width 0.3s ease;
}

.progress-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.progress-text {
    color: #6b7280;
}

.progress-id {
    font-family: 'Monaco', 'Menlo', monospace;
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

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

.modal-content {
    background: white;
    border-radius: 0.75rem;
    max-width: 28rem;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
}

.modal-close:hover {
    background-color: #f3f4f6;
}

.modal-body {
    padding: 1.5rem;
    text-align: center;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.qr-code {
    width: 12rem;
    height: 12rem;
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-info {
    margin-bottom: 1.5rem;
}

.qr-info code {
    font-family: 'Monaco', 'Menlo', monospace;
    background-color: #f3f4f6;
    color: #22c55e;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.qr-note {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
}

.modal-actions button {
    flex: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}


/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1rem; 
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column-reverse; 
    gap: 0.5rem;
    align-items: flex-end; 

}


.toast {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #22c55e;
    min-width: 20rem;
    animation: slideIn 0.3s ease;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.error .toast-title {
    color: #ef4444;
}

.toast-message {
    font-size: 0.875rem;
    color: #6b7280;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
/* OLD:
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .logo {
        flex: 1;
        min-width: 200px;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        padding: 1rem 0;
        border-top: 1px solid #e5e7eb;
    }
    
    .nav-link span {
        display: none;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .auth-buttons {
        gap: 0.5rem;
    }
    
    .auth-buttons .btn-ghost,
    .auth-buttons .btn-primary {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .auth-buttons span {
        display: none;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .search-bar select {
        min-width: auto;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .file-actions {
        align-self: stretch;
        justify-content: space-between;
    }
    
    .stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .toast {
        min-width: auto;
        margin: 0 1rem;
    }
    
    .user-dropdown {
        right: auto;
        left: 0;
    }
}
*/

/* NEW RESPONSIVE STYLES */

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #22c55e; /* Green color */
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 1rem;
}

/* Mobile Menu Wrapper */
.mobile-menu-wrapper {
    display: flex; /* Flex on desktop */
    flex-grow: 1;
    justify-content: flex-end; /* Push items to the right */
    align-items: center;
    gap: 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem; /* Slightly more padding on mobile */
    }

    .header-content {
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap; /* Prevent wrapping in header on very small screens */
    }

    .tagline {
        display: none; /* Hide tagline on mobile */
    }

    /* Mobile Menu Toggle visible */
    .mobile-menu-toggle {
        display: block;
        order: 3; /* Position after logo, before user/auth */
        margin-left: auto; /* Push to the right */
    }
    
    /* Hide desktop nav and auth buttons by default */
    .mobile-menu-wrapper {
        display: none; /* Hide on mobile by default */
        position: fixed;
        top: 4rem; /* Below header */
        left: 0;
        width: 100%;
        height: calc(100% - 4rem); /* Full height minus header */
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 0;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        z-index: 990; /* Below header, above content */
        overflow-y: auto; /* Allow scrolling for long menus */
        transform: translateX(100%); /* Start off-screen */
        transition: transform 0.3s ease-in-out;
    }

    .mobile-menu-wrapper.active {
        display: flex; /* Show when active */
        transform: translateX(0); /* Slide in */
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0; /* Remove gap for stacked links */
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
        border-bottom: 1px solid #e5e7eb;
    }

    .nav-link {
        width: 100%;
        padding: 1rem 0; /* More padding for touch */
        justify-content: center; /* Center icons and text */
        font-size: 1.1rem; /* Larger font size */
        color: #374151; /* Darker color for readability */
    }
    .nav-link.active {
        color: #22c55e;
        background-color: rgba(34, 197, 94, 0.1);
    }
    .nav-link span {
        display: inline; /* Show text on mobile nav */
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        padding: 0 1rem; /* Add padding for buttons */
    }
    
    .header-actions .btn-ghost,
    .header-actions .btn-primary {
        width: 100%; /* Full width buttons */
        padding: 1rem; /* Larger touch area */
        font-size: 1rem;
        justify-content: center; /* Center icon and text */
    }

    .user-menu {
        position: static; /* Remove absolute positioning */
        width: 100%; /* Full width */
        margin-top: 0; /* Remove margin */
    }
    .user-avatar {
        display: none; /* Hide avatar in mobile menu when open, show in header */
    }
    .header-actions .user-avatar { /* Keep avatar visible in header */
        display: flex;
    }
    .user-dropdown {
        position: static; /* Remove absolute positioning */
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 0;
        margin-top: 0;
        border-radius: 0;
        background: none;
    }
    .user-info {
        padding: 1rem; /* Adjust padding */
        text-align: center;
    }
    .dropdown-divider {
        display: none; /* Hide divider in mobile menu */
    }
    .dropdown-item {
        justify-content: center; /* Center dropdown items */
        font-size: 1rem;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    .auth-buttons .btn-ghost,
    .auth-buttons .btn-primary {
        width: 100%;
        padding: 1rem; /* Larger touch area */
        font-size: 1rem;
    }
    .auth-buttons span {
        display: inline; /* Show text on mobile auth buttons */
    }

    /* Main Content adjustments */
    .main {
        padding: 1.5rem 0; /* Reduce vertical padding */
    }

    .section {
        gap: 1.5rem; /* Reduce gap between sections */
    }

    .upload-card {
        padding: 1.5rem; /* Reduce padding */
    }
    .upload-card h3 {
        font-size: 1.1rem; /* Slightly smaller heading */
    }
    .upload-card p {
        font-size: 0.9rem;
    }

    .file-types {
        justify-content: center;
        gap: 0.25rem; /* Smaller gap for tags */
    }
    .file-type {
        font-size: 0.75rem; /* Smaller tags */
        padding: 0.15rem 0.4rem;
    }

    .files-card {
        padding: 1rem; /* Reduce card padding */
    }
    .card-header {
        flex-direction: column; /* Stack header items */
        align-items: flex-start; /* Align to left */
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    .card-header h4 {
        font-size: 1rem; /* Smaller heading */
    }
    .stats {
        flex-direction: column; /* Stack stats */
        gap: 0.25rem;
        font-size: 0.8rem;
    }

    .search-bar {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    .search-input {
        width: 100%;
    }
    .search-bar select {
        width: 100%;
        min-width: unset; /* Remove min-width constraint */
    }

    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.75rem; /* Reduce file item padding */
    }
    .file-info {
        width: 100%; /* Full width for info */
        flex-wrap: wrap; /* Allow wrapping for long filenames */
    }
    .file-details h5 {
        font-size: 0.9rem; /* Smaller file name */
    }
    .file-meta {
        font-size: 0.75rem; /* Smaller meta info */
    }
    .file-actions {
        width: 100%; /* Full width actions */
        justify-content: space-around; /* Distribute actions */
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    .file-id {
        font-size: 0.7rem; /* Smaller file ID */
    }
    .btn-small {
        padding: 0.15rem 0.3rem; /* Even smaller buttons */
        font-size: 0.7rem;
    }

    /* Admin Table - Responsive */
    .admin-table {
        display: block; /* Make table a block element */
        width: 100%;
        overflow-x: auto; /* Enable horizontal scrolling for table if needed */
        -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
        white-space: nowrap; /* Prevent content from wrapping inside cells */
    }
    .admin-table thead, .admin-table tbody, .admin-table th, .admin-table td, .admin-table tr {
        display: block; /* Make table elements behave like blocks */
    }

    .admin-table thead {
        float: left; /* Keep header sticky */
    }
    .admin-table tbody {
        width: auto;
        overflow-x: auto; /* Allow horizontal scrolling for tbody */
    }

    .admin-table th {
        border-bottom: 0; /* Remove bottom border for stacked headers */
        border-right: 1px solid #e5e7eb; /* Add right border */
        width: 100px; /* Fixed width for header cells (adjust as needed) */
        box-sizing: border-box;
        text-align: right;
    }

    .admin-table td {
        border-bottom: 0; /* Remove bottom border for stacked cells */
        width: 100%; /* Full width for content cells */
        box-sizing: border-box;
        text-align: left;
    }
    .admin-table tr {
        margin-bottom: 10px; /* Space between rows */
        border: 1px solid #e5e7eb; /* Add border to each "row" */
        border-radius: 0.5rem;
        padding: 10px;
    }

    /* Specific adjustments for stacked table */
    .admin-table td:before {
        content: attr(data-label); /* Show header label before content */
        font-weight: bold;
        display: block;
        color: #6b7280;
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }
    .admin-table .file-info, .admin-table .file-details {
        flex-direction: row; /* Keep file info horizontal inside cell */
        align-items: center;
    }
    .admin-table .file-actions {
        margin-top: 10px;
        justify-content: flex-start;
        gap: 0.75rem;
    }


    /* Upload Progress */
    .progress-item {
        padding: 0.75rem; /* Reduce padding */
    }
    .progress-filename {
        font-size: 0.9rem;
    }
    .progress-size {
        font-size: 0.65rem;
    }
    .progress-text, .progress-id {
        font-size: 0.7rem;
    }


    /* Modals */
    .modal-content {
        max-width: 95%; /* Wider modal on small screens */
        width: auto;
        margin: 1rem;
        padding: 1rem;
    }
    .modal-header {
        padding: 1rem 1rem 0;
    }
    .modal-body {
        padding: 1rem;
    }
    .modal-header h3 {
        font-size: 1rem; /* Smaller modal heading */
    }
    .qr-code {
        width: 10rem; /* Smaller QR code */
        height: 10rem;
    }
    .modal-actions {
        flex-direction: column; /* Stack modal buttons */
        gap: 0.5rem;
    }
    .modal-actions button {
        padding: 0.8rem; /* Larger touch area for modal buttons */
    }

    .toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem; /* Make toasts full width with margin */
        width: auto;
        margin: 0;
    }
    .toast {
        min-width: unset; /* Remove min-width */
        padding: 0.75rem 1rem; /* Adjust toast padding */
        font-size: 0.8rem;
    }
    .toast-title {
        font-size: 0.9rem;
    }
}
