/* CSS Reset & Variables */
:root,
[data-theme="light"] {
    --primary-blue: #1a73e8;
    --primary-blue-hover: #1765cc;
    --primary-bg: #f8fafe;
    --sidebar-bg: rgba(255, 255, 255, 0.5);
    --header-bg: transparent;
    --surface-white: #ffffff;
    --surface-elevated: #f0f4f9;
    --text-main: #1f1f1f;
    --text-secondary: #444746;
    --text-subtle: #747775;
    --border-light: rgba(0, 0, 0, 0.08);
    --border-focus: #1a73e8;
    --hover-bg: rgba(0, 0, 0, 0.04);
    --hover-btn: #f0f4f9;
    --selected-bg: #c2e7ff;
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --blur-amt: 50px;
    --glass-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --toast-bg: #323232;
    --toast-text: #ffffff;
    --search-bg: #ecf3fe;
    --storage-bar-bg: #e0e0e0;
    --hover-effect-bg: #f0f4f9;
    --shape-1-bg: #d3e3fd;
    --shape-2-bg: #e8def8;
    --icon-color: #444746;
    --filter-btn-bg: var(--surface-white);
    --filter-btn-text: var(--text-secondary);
}

.hidden {
    display: none !important;
}

[data-theme="dark"] {
    --primary-blue: #0078d4;
    --primary-blue-hover: #0086ef;
    --primary-bg: #1f1f1f;
    --sidebar-bg: #252526;
    --header-bg: #252526;
    --surface-white: #2a2a2a;
    --surface-elevated: #303030;
    --text-main: #d4d4d4;
    --text-secondary: #9da0a6;
    --text-subtle: #8a8a8a;
    --border-light: #3c3c3c;
    --border-focus: #0078d4;
    --hover-bg: #333333;
    --hover-btn: #333333;
    --selected-bg: #3a3d41;
    --glass-bg: rgba(30, 30, 30, 0.4);
    --glass-border: 1px solid rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    --toast-bg: #ffffff;
    --toast-text: #1f1f1f;
    --search-bg: #303030;
    --storage-bar-bg: #3c4043;
    --hover-effect-bg: #333333;
    --shape-1-bg: #1a2736;
    --shape-2-bg: #2d1a36;
    --icon-color: #c5c5c5;
    --filter-btn-bg: var(--selected-bg);
    --filter-btn-text: var(--primary-blue);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    -webkit-user-select: none;
    user-select: none;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

@media (max-width: 520px) {

    html,
    body {
        overflow-x: hidden !important;
        position: relative;
        max-width: 100vw;
    }
}

/* Background Decoration for Glass Effect showcase */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--shape-1-bg);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: var(--shape-2-bg);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 20px);
    }
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

@media (max-width: 520px) {
    .app-container {
        height: 100dvh;
        width: 100vw;
        overflow-x: hidden;
    }
}

/* Glass Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amt));
    -webkit-backdrop-filter: blur(var(--blur-amt));
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Sidebar */
.sidebar {
    width: 256px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    z-index: 10;
    background: var(--sidebar-bg);
    box-shadow: none !important;
    border-right: none !important;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    cursor: pointer;
}

.logo-icon {
    font-size: 32px;
    color: var(--primary-blue);
}

.logo-text {
    font-size: 22px;
    color: var(--text-secondary);
    font-weight: 500;
}


/* Nav Menu */
.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 8px 24px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 0 24px 24px 0;
    font-size: 18px;
    transition: background 0.2s;
}

.nav-item.active {
    background: var(--selected-bg);
    color: var(--primary-blue);
    font-weight: 500;
}

.nav-item:hover:not(.active) {
    background: var(--hover-bg);
}

.nav-item i {
    font-size: 30px;
}

/* Storage Info */
.storage-info {
    padding: 0 16px 0 24px;
    /* Indent to align with text (24px padding left) */
    margin-top: 10px;
    /* Small gap after Storage link */
    margin-bottom: 24px;
    font-size: 16px;
    /* Smaller text as seen in screenshot */
    color: var(--text-secondary);
}

.storage-bar {
    height: 4px;
    background: var(--storage-bar-bg);
    margin-bottom: 8px;
    overflow: hidden;
}

.storage-used {
    height: 100%;
    background: var(--primary-blue);
}


/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface-white);
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    box-shadow: none;
}

/* Top Bar */
.top-bar {
    height: auto;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 16px 12px 16px;
    z-index: 500;
    /* Ensure this is above all other content for dropdowns */
    background: var(--surface-white);
    /* Solid background to prevent bleed-through */
    box-shadow: none;
    position: relative;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--search-bg);
    border-radius: 24px;
    padding: 0 16px;
    height: 46px;
    max-width: 700px;
    width: 100%;
    margin-right: auto;
    transition: background 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
    background: var(--surface-elevated);
    box-shadow: var(--shadow-main);
    border: 1px solid var(--border-focus);
}

.search-bar i {
    font-size: 20px;
    color: var(--text-secondary);
}

.search-bar input {
    border: none;
    background: transparent;
    flex: 1;
    margin: 0 12px;
    font-size: 20px;
    color: var(--text-main);
    outline: none;
    -webkit-user-select: text;
    user-select: text;
}

.search-bar input::placeholder {
    color: var(--text-subtle);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 160px;
}

/* Profile Dropdown Styles */
.profile-container {
    position: relative;
    /* Ensure absolute positioning works */
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    /* Align flush right with button */
    margin-top: 8px;
    z-index: 2000;
    min-width: 260px;
    /* Fixed width for typical dropdown look */
    animation: fadeInScale 0.2s ease-out;
}

.profile-dropdown-card {
    background: #ffffff;
    /* Clean white background */
    border-radius: 24px;
    /* Rounded corners per image */
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 0 4px rgba(0, 0, 0, 0.05);
    padding: 12px 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 24px 16px 24px;
    /* Match image spacing */
}

/* Ensure the header avatar matches the button style */
.header-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
}

.user-name {
    font-size: 18px;
    font-weight: 500;
    color: #202124;
}

.menu-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 8px 0;
}

.profile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-action-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 24px;
    text-decoration: none;
    color: #3c4043;
    font-size: 16px;
    transition: background 0.1s;
}

.menu-action-item:hover {
    background: #f5f5f5;
}

.menu-action-item i {
    font-size: 20px;
    color: #5f6368;
}

[data-theme="dark"] .profile-dropdown-card {
    background: #303030;
    color: #e8eaed;
}

[data-theme="dark"] .user-name {
    color: #e8eaed;
}

[data-theme="dark"] .menu-action-item {
    color: #e8eaed;
}

[data-theme="dark"] .menu-action-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .menu-action-item i {
    color: #9aa0a6;
}

[data-theme="dark"] .menu-divider {
    background: #5f6368;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: box-shadow 0.2s;
    border: none;
    outline: none;
}

.user-avatar:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.icon-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 24px;
    transition: background 0.2s;
}

.icon-btn:hover {
    background: var(--hover-bg);
}

.icon-btn:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.icon-btn.active {
    background: var(--selected-bg);
    color: var(--text-main);
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 20px;
    border: none;
    outline: none;
}

/* File View Container */
.file-view-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 4px 16px;
    background: var(--surface-white);
    border-radius: 24px 24px 0 0;
    margin-right: 16px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

.view-header-sticky {
    position: sticky;
    top: -4px;
    z-index: 200;
    background: var(--surface-white);
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 12px 0;
    background: var(--surface-white);
}

.header-filter {
    position: relative;
    display: flex;
    align-items: center;
}

.header-drive-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 44px;
    font-weight: 500;
    color: var(--text-main);
    transition: background 0.2s;
    user-select: none;
    margin: 0;
}

.header-drive-btn:hover,
.header-drive-btn.active {
    background: var(--hover-bg);
}

.header-drive-btn i {
    font-size: 14px;
    color: var(--text-subtle);
    margin-top: 4px;
    transition: transform 0.2s;
}

.header-drive-btn.active i {
    transform: rotate(180deg);
}

.header-dropdown {
    min-width: 320px;
    left: 10px;
    top: 100%;
    margin-top: 4px;
    z-index: 1000;
}


.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 120px;
}

.toolbar-filters-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-btn {
    display: flex;
    align-items: center;
    /* justify-content: space-between; REMOVED */
    gap: 12px;
    /* Very small gap */
    background: var(--filter-btn-bg);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 6px 20px;
    /* More breathing room */
    font-size: 12px;
    font-weight: 500;
    color: var(--filter-btn-text);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    height: 40px;
    /* Compact height */
    min-width: auto;
    /* Allow shrink */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .filter-btn {
    border-color: transparent;
}

.filter-btn:hover {
    background: var(--hover-effect-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-btn span {
    font-size: 22px;
    /* Large text as seen in screenshot */
    font-weight: 500;
    color: inherit;
}

/* Filter Dropdown Wrapper */
.filter-wrapper {
    position: relative;
}

.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amt)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--blur-amt)) saturate(200%);
    border-radius: 12px;
    padding: 16px 0 8px 0;
    width: 220px;
    box-shadow: var(--glass-shadow);
    border: var(--glass-border);
    display: none;
    z-index: 200;
    flex-direction: column;
}

.filter-dropdown.show {
    display: flex;
}

.dropdown-header {
    font-size: 16px;
    color: var(--primary-blue);
    padding: 0 24px;
    margin-bottom: 8px;
    font-weight: 500;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 24px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--hover-bg);
}

.dropdown-item i {
    font-size: 18px;
    color: var(--primary-blue);
}

.filter-btn.active {
    background: var(--search-bg);
    /* Matches dropdown bg */
    border-color: transparent;
    color: var(--primary-blue);
}

.filter-btn.active span {
    font-weight: 700;
    /* Bold text when active */
    color: var(--primary-blue);
}

.filter-btn.active i {
    color: var(--primary-blue);
}

.view-toggles {
    display: flex;
    border-radius: 24px;
    /* Similiar roundedness */
    border: 1px solid rgba(0, 0, 0, 0.12);
    /* Match border */
    overflow: hidden;
    height: 48px;
    /* Match height */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Match shadow */
    background: var(--surface-white);
}

.view-toggles .icon-btn {
    width: 60px;
    /* Wider buttons */
    height: 100%;
    font-size: 24px;
    /* Larger icons */
    border-radius: 0;
    padding: 0;
    color: var(--text-secondary);
}

.view-toggles .icon-btn.active {
    background: var(--selected-bg);
    color: var(--primary-blue-hover);
}

.view-toggles .icon-btn:hover:not(.active) {
    background: var(--hover-btn);
}

/* File List Table */
.file-list-header {
    display: grid;
    grid-template-columns: minmax(280px, 3fr) 200px 120px 48px;
    padding: 0 16px;
    color: var(--text-subtle);
    font-size: 16px;
    font-weight: 500;
    height: 48px;
    align-items: center;
    background: var(--surface-white);
}

.file-list {
    display: flex;
    flex-direction: column;
    margin-top: 8px;
    padding-bottom: 50px;
    /* Space for scroll */
}

.file-row {
    display: grid;
    grid-template-columns: minmax(280px, 3fr) 200px 120px 48px;
    padding: 10px 16px;
    border-bottom: 1px solid transparent;
    border-top: 1px solid transparent;
    align-items: center;
    font-size: 19px;
    color: var(--text-secondary);
    cursor: default;
    border-radius: 4px;
    margin-bottom: 2px;
    transition: background-color 0.15s;
    position: relative;
}

/* Hover & Selected States */
.file-row:hover {
    background-color: var(--hover-effect-bg);
}

.file-row.active-state {
    background-color: var(--selected-bg);
    color: var(--text-main);
}

.file-row.active-state .file-name {
    color: var(--text-main);
    font-weight: 500;
}

/* Column Styles */
.col-name {
    display: flex;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    padding-right: 16px;
}

.file-info-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    flex: 1;
}

.item-meta {
    display: none;
}

.activity-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.activity-badge.opened {
    background: rgba(66, 133, 244, 0.1);
    color: var(--primary-blue);
    border: 1px solid rgba(66, 133, 244, 0.2);
}

.activity-badge.edited {
    background: rgba(52, 168, 83, 0.1);
    color: #34a853;
    border: 1px solid rgba(52, 168, 83, 0.2);
}

[data-theme="dark"] .activity-badge.opened {
    background: rgba(66, 133, 244, 0.2);
    color: #8ab4f8;
}

[data-theme="dark"] .activity-badge.edited {
    background: rgba(52, 168, 83, 0.2);
    color: #81c995;
}

.file-icon {
    font-size: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-subtle);
}

.custom-folder-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.file-icon.folder {
    color: var(--text-secondary);
}

.file-icon.pdf {
    color: #ea4335;
}

.file-icon.word {
    color: #4285f4;
}

.file-icon.excel {
    color: #34a853;
}

.file-icon.ppt {
    color: #fbbc04;
}

.file-icon.image {
    color: #ea4335;
}

.file-icon.video {
    color: #ea4335;
}

.file-icon.archive {
    color: #666;
}

.col-date,
.col-size {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
}

/* Three dots spacer (optional interaction trigger) */
.col-actions {
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.2s;
}

.file-row:hover .col-actions,
.file-row.active-state .col-actions {
    opacity: 1;
}

/* Action Panel (Popover) */
.action-panel {
    position: fixed;
    min-width: 240px;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px 0;
    z-index: 10000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transform-origin: top left;
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;
}

.action-panel.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.95);
}

.action-panel.scale-in {
    opacity: 1;
    transform: scale(1);
}

.action-list {
    list-style: none;
}

.action-list li {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    font-size: 14.5px;
    font-weight: 400;
    color: var(--text-main);
    transition: background 0.15s;
}

.action-list li:hover {
    background: #f1f3f4;
}

.action-list li i {
    font-size: 20px;
    color: #5f6368;
}

.action-list li.danger {
    color: #d93025;
}

.action-list li.danger i {
    color: #d93025;
}

.action-list li.separator {
    height: 1px;
    background: var(--border-light);
    margin: 4px 8px;
    padding: 0;
    pointer-events: none;
}

/* Item More Button (3 dots) */
.item-more-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-subtle);
    transition: background 0.2s, color 0.2s;
}

.item-more-btn:hover {
    background-color: var(--hover-effect-bg) !important;
    color: var(--text-main);
}

.item-more-btn i {
    font-size: 22px;
}

/* col-actions handling */
.col-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
}

.file-list.grid-view .col-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    width: auto;
    opacity: 1;
    /* Keep visible on mobile-like interaction */
}

.file-row.active-state {
    background-color: var(--hover-effect-bg) !important;
}

/* Drop Zone Overlay */
.drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    backdrop-filter: blur(4px);
}

.drop-overlay.hidden {
    display: none;
}

.drop-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    color: var(--primary-blue);
    pointer-events: none;
    /* Let drops pass through if needed, but here we block */
}

.drop-content i {
    font-size: 96px;
}

.drop-content h3 {
    font-size: 32px;
    font-weight: 400;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--toast-bg);
    color: var(--toast-text);
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.danger {
    background: #d93025;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        display: none;
        /* Hide sidebar on mobile for simplicity */
    }

    .file-list-header {
        grid-template-columns: 1fr 48px;
    }

    .file-row {
        grid-template-columns: 1fr 48px;
    }

    .col-date,
    .col-size {
        display: none;
        /* Hide detailed cols on mobile */
    }

    .main-content {
        margin: 0;
        border-radius: 0;
    }

    .search-bar {
        max-width: none;
    }
}

/* Language Switcher & Theme Toggle */
.theme-tgl-btn {
    margin-right: 8px;
    border: 1px solid transparent;
}

.theme-tgl-btn:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.language-select-container {
    position: relative;
    margin-right: 16px;
}

.language-select-container {
    position: relative;
    z-index: 1000;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: background 0.2s;
}

.lang-btn:hover {
    background: var(--hover-bg);
}

.flag-icon-img {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    /* Slightly more rounded for bigger size */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--surface-white);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-light);
    padding: 8px 0;
    min-width: 180px;
    display: none;
    z-index: 6000;
    flex-direction: column;
}

.lang-dropdown.show {
    display: flex;
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-main);
}

.lang-option:hover {
    background: var(--hover-bg);
}



.new-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amt)) saturate(200%);
    -webkit-backdrop-filter: blur(var(--blur-amt)) saturate(200%);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--border-light);
    padding: 8px 0;
    min-width: 300px;
    display: none;
    z-index: 1000;
    flex-direction: column;
}

.new-dropdown.show {
    display: flex;
}

.new-dropdown .menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 15px;
    color: var(--text-main);
    transition: background 0.1s;
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
}

.new-dropdown .menu-item:hover {
    background: var(--hover-bg);
}

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.new-dropdown .menu-item i {
    font-size: 20px;
    color: var(--text-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

.new-dropdown .menu-item .chevron,
.shortcut {
    color: var(--text-subtle);
    font-size: 14px;
}

/* Override for specific colored icons handled inline or specific classes */

.menu-separator {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

/* Grid View Transformation */
.file-list.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 16px;
}

.file-list.grid-view .file-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 180px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 0;
}

.file-list.grid-view .file-row:hover {
    background-color: var(--hover-effect-bg);
    box-shadow: var(--shadow-main);
}

.file-list.grid-view .col-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.file-list.grid-view .file-icon {
    font-size: 64px;
    /* Bigger icons in grid */
    margin-right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-list.grid-view .custom-folder-icon {
    width: 80px;
    height: 80px;
}

.file-list.grid-view .file-name-text {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Hide other columns in grid view */
.file-list.grid-view .col-date,
.file-list.grid-view .col-size {
    display: none;
}

.file-list.grid-view .col-actions {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* Hide header when grid is active */
.file-view-container.grid-active .file-list-header {
    display: none;
}

/* Overrides for FAB Dropdown */
.content-fab .new-dropdown {
    top: auto;
    bottom: calc(100% + 12px);
    left: auto;
    right: 0;
    margin-top: 0;
    transform-origin: bottom right;
    z-index: 10000;
    animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-subtle);
    text-align: center;
    width: 100%;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
    font-weight: 500;
}

/* Storage Dashboard Visibility Toggles */
.storage-active .breadcrumb-area,
.storage-active .file-list-header {
    display: none !important;
}

/* Storage Dashboard View */
.storage-dashboard {
    padding: 12px 20px;
    max-width: 800px;
    margin: 0;
}

.storage-title {
    font-size: 36px;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 24px;
    padding: 6px 0;
}

.storage-summary {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.storage-stacked-bar {
    display: flex;
    height: 10px;
    background: var(--surface-elevated);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 40px;
    width: 100%;
    border: 1px solid var(--border-light);
}

.storage-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.storage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 140px;
}

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

.legend-label {
    font-size: 14px;
    color: var(--text-main);
}

.legend-size {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: auto;
    padding-left: 8px;
}

[data-theme="dark"] .storage-stacked-bar {
    background: #333;
}



.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-name {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
}

[data-theme="dark"] .profile-dropdown-card {
    background: rgba(30, 30, 30, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* New Header Styles */
.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
}

.header-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 500;
    overflow: hidden;
}

.header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-main);
}

.view-profile-link {
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
}

.view-profile-link:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.menu-divider {
    height: 1px;
    background: var(--border-light);
    width: 100%;
}

/* Menu List Styles */
.profile-menu-list {
    list-style: none;
    padding: 8px 0;
}

.profile-menu-list li {
    padding: 0 8px;
    /* Safe space for rounded hover */
}

.menu-action-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 16px;
    border-radius: 8px;
    transition: background 0.2s;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.menu-action-item:hover {
    background: var(--hover-bg);
}

.menu-action-item i {
    font-size: 22px;
    color: var(--text-secondary);
}

.text-danger {
    color: var(--text-main);
    /* Keep standard color unless specific danger icon color needed, image shows text black */
}

/* Adjustments for icons in list */
.menu-action-item .ph-sign-out {
    transform: scaleX(-1);
    /* Mirror icon if needed to look like 'exit' */
}

/* Info & Details Dropdown */
.info-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.details-drawer {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    margin-top: 8px;
    background: var(--surface-medium);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    padding: 0;
}

.details-drawer.hidden {
    display: none !important;
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.details-header h2 {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
}

.details-header .close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
}

.details-header .close-btn:hover {
    background: var(--hover-bg);
}

.details-body {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.details-empty-state {
    text-align: center;
    color: var(--text-subtle);
    padding: 20px 0;
    font-size: 14px;
}

.details-item-icon {
    font-size: 40px;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.details-item-name {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 20px;
    text-align: center;
    word-break: break-all;
}

.details-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.details-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.details-label {
    font-size: 11px;
    color: var(--text-subtle);
    text-transform: capitalize;
}

.details-value {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.4;
}

@media (max-width: 520px) {
    .details-drawer {
        width: calc(100vw - 32px);
        position: fixed;
        right: 16px;
        left: 16px;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Profile Edit Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: rgba(255, 255, 255, 0.95);
    width: 90%;
    max-width: 400px;
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-overlay:not(.hidden) .modal-card {
    transform: translateY(0);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-modal-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-modal-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    /* Increased spacing between inputs */
}

.profile-upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.large-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.large-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-btn {
    color: #1a73e8;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    transition: background 0.2s;
}

.upload-btn:hover {
    background: rgba(26, 115, 232, 0.1);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-group input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: #1a73e8;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.btn-cancel {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-action);
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-save {
    padding: 8px 20px;
    border: none;
    background: #1a73e8;
    color: white;
    font-weight: 500;
    cursor: pointer;
    border-radius: 20px;
    transition: background 0.2s, transform 0.1s;
}

.btn-save:hover {
    background: #1557b0;
}

.btn-save:active {
    transform: scale(0.98);
}

/* Dark Mode Support for Modal */
body.dark-mode .modal-card {
    background: #2d2d2d;
    color: #e8eaed;
}

body.dark-mode .modal-header h3 {
    color: #e8eaed;
}

body.dark-mode .input-group input {
    background: #3c4043;
    border-color: #5f6368;
    color: #e8eaed;
}

body.dark-mode .input-group input:focus {
    border-color: #8ab4f8;
}

body.dark-mode .close-modal-btn {
    color: #9aa0a6;
}

body.dark-mode .close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .btn-cancel {
    color: #e8eaed;
}

body.dark-mode .btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Storage Icon Gradient */
.storage-gradient-icon {
    font-size: 30px;
    background: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.nav-icon-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* Breadcrumb Styles */
.dkz-bc-container {
    display: none;
    align-items: center;
    gap: 0;
    padding: 8px 12px;
    margin-bottom: 4px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-secondary);
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.dkz-bc-container::-webkit-scrollbar {
    display: none;
}

.dkz-bc-container.show {
    display: flex;
}

.dkz-bc-item {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    color: var(--text-main);
    font-weight: 500;
}

.dkz-bc-item:hover {
    background: var(--hover-bg);
    text-decoration: underline;
}

.dkz-bc-item.active {
    color: var(--text-subtle);
    cursor: default;
    pointer-events: none;
    text-decoration: none;
}

.dkz-bc-separator {
    color: var(--text-subtle);
    font-size: 14px;
    margin: 0 8px;
    user-select: none;
}

/* --- Responsive Design Enhancements --- */

/* Hide mobile menu button on desktop */
#mobileMenuBtn {
    display: none !important;
}

/* Body scroll lock */
.dkz-no-scroll {
    overflow: hidden !important;
}

/* Sidebar Overlay */
#sidebarOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    display: none;
}

#sidebarOverlay.active {
    opacity: 1;
    pointer-events: auto;
    display: block;
}

/* Base Mobile Styles & Breakpoints */
@media (max-width: 1024px) {

    /* iPad / Tablet Portrait & Below - Force full bleed */
    html,
    body {
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .app-container {
        flex-direction: column;
        width: 100vw !important;
        height: 100dvh !important;
        max-width: 100vw !important;
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 280px;
        transform: translateX(-110%);
        transition: transform .25s ease;
        z-index: 1100;
        background: var(--surface-white);
        display: flex !important;
        /* Force show on mobile */
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .main-content {
        margin: 0 !important;
        border-radius: 0 !important;
        flex: 1 !important;
        width: 100% !important;
        height: 100% !important;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .file-view-container {
        margin-right: 0 !important;
        border-radius: 0 !important;
        flex: 1 !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 16px;
    }

    .header-drive-btn {
        font-size: 32px !important;
        font-weight: 500 !important;
        /* Increased per request while maintaining balance for mobile */
    }

    #mobileMenuBtn {
        display: flex !important;
        margin-right: 0;
        z-index: 1200;
        /* Ensure it's above other elements */
        pointer-events: auto;
    }

    .top-bar {
        padding: 12px;
        gap: 8px;
        min-height: 56px;
        width: 100% !important;
    }

    .search-bar {
        max-width: none !important;
        margin-right: 0 !important;
        height: 40px;
        padding: 0 10px;
    }

    .search-bar i {
        font-size: 16px;
    }

    .search-bar input {
        font-size: 14px;
        margin: 0 8px;
    }

    .user-actions {
        margin-right: 0 !important;
        gap: 8px !important;
    }

    .toolbar-actions {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-right: 0 !important;
        gap: 8px !important;
        overflow: visible !important;
    }

    .toolbar-filters-group {
        display: flex;
        gap: 8px;
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 520px) {

    /* Critical Fix: One-line header layout matching screenshot */
    .top-bar {
        flex-wrap: nowrap !important;
        justify-content: flex-start;
        padding: 42px 10px 10px 10px !important;
        gap: 6px;
        width: 100vw !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }

    .file-view-container {
        padding: 0 12px !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .sidebar {
        z-index: 5000 !important;
    }

    #sidebarOverlay {
        z-index: 4500 !important;
    }

    /* Filter Buttons optimization */
    .filter-btn {
        height: 34px !important;
        padding: 0 12px !important;
        gap: 6px !important;
        border-radius: 17px !important;
    }

    .filter-btn span {
        font-size: 13px !important;
    }

    .filter-btn i {
        font-size: 12px !important;
    }

    .filter-dropdown {
        z-index: 6000 !important;
        width: 200px !important;
    }

    .search-bar {
        flex: 1;
        min-width: 0;
        order: unset;
        margin-top: 0;
        height: 36px;
    }

    .search-bar .filter-icon {
        display: none;
    }

    .user-actions {
        gap: 4px;
        flex-shrink: 0;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
        flex-shrink: 0;
    }

    .language-select-container {
        margin: 0;
        flex-shrink: 0;
    }

    .lang-btn {
        padding: 4px 4px;
        gap: 2px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
        flex-shrink: 0;
    }

    /* Keep View Toggles visible */
    .view-toggles {
        display: flex !important;
        height: 36px;
        margin-left: auto;
    }

    .view-toggles .icon-btn {
        width: 40px;
    }

    /* Grid View: 2 Columns on Mobile with side gutters */
    .file-list.grid-view {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 0 24px 0 !important;
        box-sizing: border-box !important;
    }

    .file-list.grid-view .file-row {
        height: 140px !important;
        padding: 12px !important;
        width: 100% !important;
        /* Ensure card takes full column width */
    }

    .file-list.grid-view .file-icon {
        font-size: 48px !important;
    }

    .file-list.grid-view .custom-folder-icon {
        width: 56px !important;
        height: 56px !important;
    }

    .file-list.grid-view .file-name-text {
        font-size: 13px !important;
        max-width: 100% !important;
        white-space: normal !important;
        /* Allow wrapping for long names if needed */
        line-height: 1.2 !important;
    }

    .breadcrumb-area {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        padding: 24px 0 10px 0 !important;
    }

    /* List View Metadata for Mobile */
    .file-list:not(.grid-view) .file-info-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        overflow: hidden;
    }

    .file-list:not(.grid-view) .file-name-wrapper {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        overflow: hidden;
    }

    .file-list:not(.grid-view) .file-name-text {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 15px;
        font-weight: 500;
        color: var(--text-main);
    }

    .file-list:not(.grid-view) .item-meta {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        color: var(--text-subtle);
        white-space: nowrap;
    }

    .file-list:not(.grid-view) .meta-sep {
        opacity: 0.6;
    }

    .file-list-header {
        background: var(--surface-white);
    }

    /* Density Fixes for Filter Buttons */
    .filter-btn {
        height: 34px !important;
        padding: 0 8px !important;
        font-size: 13px !important;
        max-width: 120px;
    }

    .filter-btn span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .view-toggles {
        margin-left: 0 !important;
        flex-shrink: 0;
    }

    /* Special Fix for Very Small Screens (iPhone SE) */
    @media (max-width: 390px) {
        .breadcrumb-area {
            padding: 20px 0 10px 0 !important;
        }

        .toolbar-actions {
            gap: 4px !important;
        }

        .toolbar-filters-group {
            gap: 4px;
        }

        .filter-btn {
            padding: 0 6px !important;
            font-size: 12px !important;
            gap: 2px !important;
        }

        .view-toggles .icon-btn {
            width: 34px !important;
        }

        .file-list.grid-view {
            gap: 10px !important;
        }
    }
}

/* Nest Hub Max & Short Desktop Displays (e.g. 1280x800) */
@media (min-width: 1025px) and (max-height: 850px) {

    html,
    body {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .app-container {
        height: 100dvh !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }

    .main-content {
        flex: 1 !important;
        height: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .file-view-container {
        flex: 1 !important;
        height: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 0 16px;
    }

    .user-actions {
        margin-right: 0 !important;
        /* Remove 160px gap */
    }


    .top-bar {
        width: 100% !important;
        padding-right: 24px !important;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        width: 240px;
        padding: 10px;
    }

    .logo-area {
        margin-bottom: 10px;
    }
}