@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Modern Reset & Variables */
:root {
    --primary: #fd7e14; /* Orange */
    --primary-hover: #e36d0d; /* Darker Orange */
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --dark: #343a40; /* A slightly lighter dark for better contrast */
    --light: #f8f9fa;
    --white: #ffffff;
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --radius: 8px; /* A slightly smaller radius for a sharper look */
}

.impersonation-banner {
    background-color: var(--primary); color: white; padding: 0.5rem 1rem; text-align: center; font-size: 0.9rem;
}
.impersonation-banner a { color: white; font-weight: bold; text-decoration: underline; }

/* Dark Mode Variables */
body.dark-mode {
    --light: #000000; /* Pure Black */
    --white: #1a1a1a; /* Dark Gray for cards/sidebar */
    --text-main: #ffffff;
    --text-muted: #adb5bd;
    --border-color: #343a40;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
}

body.dark-mode .sidebar-header {
    color: #ffffff;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    color: var(--text-main);
    margin: 0;
    height: 100vh;
    overflow: hidden;
}

.dashboard-wrapper {
    display: flex;
    height: 100vh;
    width: 100%;
}

.sidebar {
    width: 250px;
    background-color: var(--white); /* A light sidebar is more modern */
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all 0.3s ease;
    border-right: 1px solid var(--border-color);
}

.sidebar-header {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-menu {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
}

.sidebar-link {
    padding: 0.85rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-link:hover {
    background-color: var(--primary);
    color: #ffffff;
}

.sidebar-link.active {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
}

.admin-link {
    color: var(--primary);
}

body.dark-mode .admin-link {
    color: #ffffff;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    background-color: #f4f7f9; /* A slightly different shade for contrast */
}

.navbar {
    background-color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
    position: sticky;
    top: 0;
    gap: 1.5rem;
}

.nav-right-items {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-form {
    position: relative;
}

.search-form .fa-search {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.profile-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    flex: 1;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: none; /* Removing shadow for a flatter look */
    border: 1px solid var(--border-color);
}

.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    /* Swipe to delete properties */
    touch-action: pan-y; /* Allow vertical scroll but capture horizontal */
    transition: transform 0.2s ease-out;
}
.item.swiping {
    transition: none;
}

.item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.item-icon-wrapper {
    flex-shrink: 0;
}

.item-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.folder { color: #ffc107; background-color: #fff3cd; }
.file { color: var(--secondary); background-color: #f8f9fa; }
.file-pdf { color: #dc3545; background-color: #ffebee; }
.file-word { color: #2b579a; background-color: #e8f1ff; }
.file-excel { color: #217346; background-color: #e6f4ea; }
.file-ppt { color: #d24726; background-color: #fcece9; }
.file-image { color: #6610f2; background-color: #f3e5f5; }
.file-video { color: #e83e8c; background-color: #fce4ec; }
.file-audio { color: #17a2b8; background-color: #e0f7fa; }
.file-archive { color: #fd7e14; background-color: #fff3e0; }
.file-code { color: #343a40; background-color: #e9ecef; }

.item-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-grow: 1;
}

.item-name {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.version-badge {
    display: inline-block;
    background-color: var(--secondary);
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    margin-top: 0.2rem;
    align-self: flex-start;
}

.tag-badge {
    display: inline-block;
    color: white;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    margin-right: 0.2rem;
}

.item-actions {
    position: relative;
}

.more-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.more-btn:hover {
    background-color: #e9ecef;
    color: var(--text-main);
}

.context-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    z-index: 100;
    width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.context-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.context-menu li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    white-space: nowrap;
}

.context-menu li a:hover {
    background-color: #f1f3f5;
}

.context-menu li a .fa-trash-alt {
    color: var(--danger);
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    background-color: var(--primary);
}

.btn:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-sm);
}

.btn-success { background-color: var(--success); }
.btn-success:hover { background-color: #218838; }

.btn-secondary { background-color: var(--secondary); }
.btn-secondary:hover { background-color: #5a6268; }

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

input[type="text"], input[type="password"], input[type="file"] {
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form input[type="text"] {
    padding-left: 2.5rem;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.login-wrapper {
    background: var(--light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.form-group { margin-bottom: 1.5rem; }
.form-group input:not([type="checkbox"]) { width: 100%; box-sizing: border-box; }

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

.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

/* Responsive Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar { width: 200px; }
    .dashboard-wrapper.collapsed .sidebar { width: 70px; }
    .container { padding: 1.5rem; }
    .grid-view { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
}

@media (max-width: 768px) {
    .dashboard-wrapper { flex-direction: column; overflow: auto; }
    
    /* Sidebar Mobile */
    .sidebar { 
        width: 100%; 
        height: auto; 
        border-right: none; 
        border-bottom: 1px solid var(--border-color); 
        flex-shrink: 0;
    }
    
    /* Mobile Sidebar Logic: Collapsed = Menu Hidden, Expanded = Menu Visible */
    .dashboard-wrapper.collapsed .sidebar { width: 100%; }
    .dashboard-wrapper.collapsed .sidebar-menu { display: none; }
    .dashboard-wrapper.collapsed .sidebar .storage-box { display: none; }
    
    /* Override desktop collapsed styles to ensure header is visible */
    .dashboard-wrapper.collapsed .sidebar .sidebar-header { justify-content: space-between; padding: 1.5rem; }
    .dashboard-wrapper.collapsed .sidebar .sidebar-header .company-name { display: inline-block; }
    
    /* Reset link styles if they were affected by desktop collapsed rules */
    .dashboard-wrapper.collapsed .sidebar .sidebar-link { justify-content: flex-start; padding: 0.85rem 1rem; }
    .dashboard-wrapper.collapsed .sidebar .sidebar-link span { display: inline; }

    .container { padding: 1rem; }
    
    /* Navbar & Header */
    .navbar { flex-direction: column; gap: 1rem; align-items: stretch; padding: 1rem; }
    .nav-right-items { justify-content: space-between; width: 100%; }
    .search-form { width: 100%; }
    .search-form input[type="text"] { width: 100%; padding-left: 2.5rem; }
    
    .header-actions { flex-direction: column; width: 100%; gap: 0.75rem; align-items: stretch; }
    .action-form { width: 100%; }
    .action-form input { flex: 1; }
    
    /* Grid & Layout */
    .grid-view { grid-template-columns: 1fr; gap: 1rem; }
    .dashboard-stats { grid-template-columns: 1fr; }
    
    /* Modals */
    .modal-content { width: 90%; margin: 5% auto; max-height: 90vh; overflow-y: auto; }
    
    /* Hide tooltips on mobile */
    .dashboard-wrapper.collapsed .sidebar-link:hover::after { display: none; }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    position: relative;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-top: 0.5rem;
    box-sizing: border-box;
}

.fa-trash-restore { color: var(--success); }
.fa-user-plus { color: var(--primary); }
.fa-times { color: var(--danger); }

/* Preview Modal Specifics */
.modal-preview {
    max-width: 90%;
    height: 90%;
    padding: 0;
}

/* List View Styles */
.grid-view.list-view {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.grid-view.list-view .item {
    padding: 0.5rem 1rem;
}

.grid-view.list-view .item-details {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.grid-view.list-view .item-meta {
    margin-left: auto;
    padding-left: 1rem;
    min-width: 150px;
    text-align: right;
}

/* Drag and Drop Overlay */
.drag-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 123, 255, 0.1);
    border: 4px dashed var(--primary);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    font-weight: bold;
    pointer-events: none; /* Allow drop events to pass through to body */
}

.drag-overlay.active {
    display: flex;
}

/* Custom Context Menu */
.custom-context-menu {
    position: absolute;
    z-index: 1000;
    width: 180px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Item Checkboxes */
.item-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Bulk Toolbar */
.bulk-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    z-index: 900;
}

.bulk-toolbar.show {
    transform: translateX(-50%) translateY(0);
}

.bulk-actions {
    display: flex;
    gap: 0.5rem;
}

/* Storage Bar */
.storage-box {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--light);
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

/* Favorite Icon */
.favorite-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #e9ecef; /* Gray when inactive */
    cursor: pointer;
}

.favorite-icon.active {
    color: #ffc107; /* Yellow when active */
}

.favorite-icon:hover {
    transform: scale(1.1);
}

/* Admin Table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 { margin: 0; font-size: 1.2rem; }
.stat-info p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.admin-actions-row {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(26px); }

/* Notifications */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.notification-dropdown.show {
    display: block;
}

.notification-item {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notification-item.unread {
    background-color: #e8f0fe;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    border-radius: 50%;
}

/* Upload Progress */
#upload-overlay .progress-bar-bg {
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

#cancel-upload-btn {
    background-color: var(--secondary);
}

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

/* Sidebar Collapse & Tooltips */
.dashboard-wrapper.collapsed .sidebar {
    width: 80px;
}
.dashboard-wrapper.collapsed .sidebar .sidebar-header .company-name,
.dashboard-wrapper.collapsed .sidebar .sidebar-link span,
.dashboard-wrapper.collapsed .sidebar .storage-box,
.dashboard-wrapper.collapsed .sidebar .sidebar-menu .tags-header span,
.dashboard-wrapper.collapsed .sidebar .sidebar-menu .tags-header a {
    display: none;
}
.dashboard-wrapper.collapsed .sidebar .sidebar-header {
    justify-content: center;
    padding: 1rem 2.5rem;
}
.dashboard-wrapper.collapsed .sidebar .sidebar-link {
    text-align: center;
    padding: 1rem 0;
    justify-content: center;
    position: relative; /* For tooltip positioning */
    overflow: visible;
}
.dashboard-wrapper.collapsed .sidebar .sidebar-link i {
    margin-right: 0;
    font-size: 1.2rem;
}

/* Tooltip Styles */
.dashboard-wrapper.collapsed .sidebar-link:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
    margin-left: 10px;
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: none;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, transform 0.3s, background-color 0.3s;
}
#back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
}
#back-to-top.show {
    display: flex;
    opacity: 1;
}

/* Success Animation */
.loading-overlay.success .spinner { display: none; }
.loading-overlay.success .progress-bar-bg { display: none; }
.loading-overlay.success .checkmark-wrapper { display: block; }
.loading-overlay.success .btn { display: none; } /* Hide buttons in upload overlay on success */

.checkmark-wrapper {
    display: none;
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.checkmark {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--success);
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px 0px var(--success);
    animation: checkmark-fill .4s ease-in-out .4s forwards, checkmark-scale .3s ease-in-out .9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--success);
    fill: none;
    animation: checkmark-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: checkmark-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes checkmark-stroke { 100% { stroke-dashoffset: 0; } }
@keyframes checkmark-scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes checkmark-fill { 100% { box-shadow: inset 0px 0px 0px 30px transparent; } }

/* PWA Install Banner */
.pwa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark);
    color: white;
    padding: 1rem;
    display: none;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    box-sizing: border-box;
}
.pwa-banner.show {
    display: flex;
}
.close-banner {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
}

/* Pull to Refresh */
.pull-to-refresh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    transform: translateY(-100%);
    pointer-events: none; /* Let touches pass through when hidden */
}
.pull-to-refresh .spinner {
    width: 25px;
    height: 25px;
    border-width: 3px;
}
