@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

:root {
    --bg-main: #f8fafd;
    --bg-surface: #ffffff;
    --bg-hover: #f0f4f9;
    --bg-active: #e8f0fe;
    
    --text-main: #1f1f1f;
    --text-muted: #444746;
    --text-light: #747775;
    
    --border-color: #e0e2e0;
    --border-light: #f0f0f0;
    
    --accent: #0b57d0;
    --accent-hover: #0842a0;
    
    --danger: #b3261e;
    --danger-bg: #f9dedc;
    
    --success: #146c2e;
    --success-bg: #c4eed0;
    
    --sidebar-width: 256px;
    --header-height: 64px;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #131314;
        --bg-surface: #1e1f20;
        --bg-hover: #282a2c;
        --bg-active: #004a77;
        
        --text-main: #e3e3e3;
        --text-muted: #c4c7c5;
        --text-light: #8e918f;
        
        --border-color: #444746;
        --border-light: #333537;
        
        --accent: #a8c7fa;
        --accent-hover: #d3e3fd;
        
        --danger: #f2b8b5;
        --danger-bg: #8c1d18;
        
        --success: #6dd58c;
        --success-bg: #0f5223;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

button, input, select {
    font-family: inherit;
    border: none;
    outline: none;
}

/* Material Symbols configuration */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    font-size: 20px;
    color: var(--text-muted);
}

/* Layout Shell */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background-color: var(--bg-main);
    display: flex;
    flex-direction: column;
    padding: 16px;
    transition: transform 0.2s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px 24px 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
}

.brand h1 {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: -0.5px;
}

.new-button-container {
    padding-bottom: 16px;
}

.btn-new {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    width: 100%;
}

.btn-new:hover {
    background-color: var(--bg-hover);
    box-shadow: var(--shadow-md);
}

.btn-new .material-symbols-outlined {
    font-size: 24px;
    color: var(--accent);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: var(--bg-hover);
}

.nav-link.active {
    background-color: var(--bg-active);
}

.nav-link.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1;
    color: var(--accent);
}

.nav-link .material-symbols-outlined {
    color: var(--text-main);
}

.storage-panel {
    padding: 16px;
    margin-top: auto;
}

.storage-info {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.storage-meter {
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.storage-meter__fill {
    height: 100%;
    background-color: var(--accent);
    border-radius: 3px;
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg) 0 0 0;
    margin-top: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-right: none;
    border-bottom: none;
}

.topbar {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface);
}

.topbar-search {
    flex: 1;
    max-width: 720px;
    margin: 0 24px;
}

.topbar-search-wrap {
    position: relative;
    width: 100%;
}

.search-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 1500;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: min(360px, 50vh);
    overflow-y: auto;
}

.search-suggestions.hidden {
    display: none !important;
}

.search-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-main);
    text-align: left;
    width: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
}

.search-suggestion:hover,
.search-suggestion:focus {
    background: var(--bg-hover);
    outline: none;
}

.search-suggestion__icon {
    flex-shrink: 0;
    color: var(--text-muted);
}

.search-suggestion__text {
    flex: 1;
    min-width: 0;
}

.search-suggestion__name {
    font-weight: 500;
}

.search-suggestion__path {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
    word-break: break-all;
}

.modal-dialog--narrow {
    max-width: 420px;
}

.app-modal-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main);
    white-space: pre-line;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-hover);
    border-radius: var(--radius-pill);
    padding: 0 16px;
    height: 48px;
    border: 1px solid transparent;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
    background-color: var(--bg-surface);
    box-shadow: var(--shadow-md);
    border-color: var(--border-color);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0 12px;
    font-size: 16px;
    color: var(--text-main);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: background-color 0.2s;
}

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

.content-shell {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

main.main-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Flash Messages */
.flash-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.flash {
    padding: 12px 12px 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.flash__body {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.flash__text {
    min-width: 0;
}

.flash__dismiss {
    flex-shrink: 0;
    color: inherit;
    opacity: 0.9;
}

.flash__dismiss:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.12);
}

.flash--error .flash__dismiss:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

.flash--success {
    color: #ffffff;
    background-color: #146c2e;
}

.flash--success .flash__icon,
.flash--success .flash__dismiss {
    color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    .flash--success {
        background-color: var(--success-bg);
    }
}

.flash--error {
    background-color: var(--danger-bg);
    color: var(--danger);
}

/* Page Header & Breadcrumbs */
.page-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 400;
}

.breadcrumbs a {
    color: var(--text-muted);
    transition: color 0.2s;
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    margin: -4px -8px;
}

.breadcrumbs a:hover {
    background-color: var(--bg-hover);
    color: var(--text-main);
}

.breadcrumbs span {
    color: var(--text-main);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-light);
    font-size: 20px;
}

/* Toolbars and Filters */
.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.toolbar--filters-left {
    justify-content: flex-start;
}

.toolbar__filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
}

/* Drive browse: full-height hit target for empty-area right-click */
.layout-with-sidebar {
    display: flex;
    gap: 24px;
    align-items: stretch;
    flex: 1;
    min-height: calc(100vh - 220px);
    min-width: 0;
}

.drive-workspace {
    flex: 1;
    min-width: 0;
    min-height: calc(100vh - 240px);
    position: relative;
}

.filter-select {
    appearance: none;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 32px 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24'%3E%3Cpath d='M480-360 280-560h400L480-360Z' fill='%23444746'/%3E%3C/svg%3E");
    background-position: right 4px center;
    background-repeat: no-repeat;
    background-size: 20px;
}

.filter-select:hover {
    background-color: var(--bg-hover);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

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

.btn-danger {
    background-color: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

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

.btn.btn-icon-only {
    padding: 8px 10px;
    min-width: 40px;
    justify-content: center;
    gap: 0;
}

/* Item Browser */
.list-header {
    display: grid;
    grid-template-columns: minmax(200px, 2.5fr) 100px minmax(150px, 2fr) 80px minmax(100px, 1.5fr) 40px;
    align-items: center;
    padding: 8px 16px;
    gap: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.drive-workspace[data-view="grid"] .list-header {
    display: none !important;
}

.drive-workspace[data-view="list"] .list-header {
    display: grid !important;
}

.item-section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
}

.item-browser {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 100px;
}

.item-browser--grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    grid-auto-rows: min-content;
    align-items: start;
}

.item-browser--list {
    grid-template-columns: 1fr;
}

.drive-item {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: background-color 0.2s, box-shadow 0.2s;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

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

.drive-item--selected {
    border-color: var(--accent);
    background-color: rgba(66, 165, 245, 0.12);
}

.item-browser--list .drive-item--selected {
    background-color: rgba(66, 165, 245, 0.12);
    box-shadow: inset 3px 0 0 var(--accent);
}

.drive-item--dragging {
    opacity: 0.6;
}

.drive-item--drop-target {
    outline: 2px dashed var(--accent);
    outline-offset: -4px;
}

.move-drop-target--active {
    outline: 2px dashed var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
    background-color: rgba(66, 165, 245, 0.12);
}

/* Custom drag ghost */
.drag-ghost {
    position: fixed;
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #1e2128;
    border: 1px solid #444c56;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    z-index: 99999;
    pointer-events: none;
    max-width: 280px;
}

.drag-ghost--visible {
    display: flex;
}

/* Marquee (rubber band) selection */
.marquee-selection {
    position: absolute;
    border: 2px solid var(--accent, #1f6feb);
    background: rgba(31, 111, 235, 0.2);
    pointer-events: none;
    z-index: 99999;
    display: none;
    box-sizing: border-box;
}

.marquee-selection--active {
    display: block;
}

body.marquee-selecting {
    user-select: none;
    -webkit-user-select: none;
    cursor: crosshair;
}

body.marquee-selecting * {
    cursor: crosshair !important;
}

.drive-workspace {
    min-height: 200px;
}

.drag-ghost__icon {
    font-size: 20px;
    flex-shrink: 0;
}

.drag-ghost__icon.icon-folder {
    color: var(--folder-color, #8ab4f8);
}

.drag-ghost__icon.icon-image {
    color: #f28b82;
}

.drag-ghost__icon.icon-video {
    color: #c58af9;
}

.drag-ghost__icon.icon-audio {
    color: #81c995;
}

.drag-ghost__icon.icon-pdf {
    color: #f28b82;
}

.drag-ghost__icon.icon-document {
    color: #8ab4f8;
}

.drag-ghost__name {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.drag-ghost__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent, #1f6feb);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 10px;
    flex-shrink: 0;
}

.item-browser--list .drive-item {
    display: grid;
    grid-template-columns: minmax(200px, 2.5fr) 100px minmax(150px, 2fr) 80px minmax(100px, 1.5fr) 40px;
    align-items: center;
    padding: 8px 16px;
    gap: 16px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    box-shadow: none;
    background-color: transparent;
}
.item-browser--list .drive-item:last-child {
    border-bottom: none;
}
.item-browser--list .drive-item:hover {
    background-color: var(--bg-hover);
}

.item-browser--list .js-list-only {
    display: flex !important;
}
.item-browser--list .js-grid-only {
    display: none !important;
}
.item-browser--grid .js-list-only {
    display: none !important;
}
.item-browser--grid .js-grid-only {
    display: flex !important;
}
.item-browser--grid img.js-grid-only {
    display: block !important;
}
.item-browser--grid .item-section-title.js-grid-only {
    display: flex !important;
}
.item-browser--list .js-icon-dynamic {
    display: grid !important;
}
.item-browser--grid .drive-item[data-is-folder="false"] .js-icon-dynamic {
    display: grid !important; /* Allow icons for all grid items in new layout */
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.whitespace-nowrap {
    white-space: nowrap;
}

.list-col-text {
    font-size: 13px;
    color: var(--text-muted);
}
.list-col-owner {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.list-col-location {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.list-col-actions {
    display: flex;
    justify-content: flex-end;
}
.owner-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: bold;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.drive-item__main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    padding: 8px 8px 8px 12px;
}

.item-browser--list .drive-item__main {
    padding: 0;
    gap: 16px;
}

.item-icon-wrapper {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    background-color: transparent;
    flex-shrink: 0;
}

.item-browser--list .item-icon-wrapper {
    width: 32px;
    height: 32px;
}

.item-icon-wrapper .material-symbols-outlined {
    font-size: 24px;
    color: var(--text-muted);
}

.item-browser--list .item-icon-wrapper .material-symbols-outlined {
    font-size: 20px;
}

.icon-folder { color: var(--text-muted) !important; font-variation-settings: 'FILL' 1; }
.icon-image { color: #d93025 !important; }
.icon-video { color: #ea4335 !important; }
.icon-audio { color: #fbbc04 !important; }
.icon-pdf { color: #d93025 !important; }
.icon-document { color: #1a73e8 !important; }

.item-thumb-wrapper {
    background-color: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.item-thumb-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-surface);
    z-index: 1;
}

.item-thumb-fallback .material-symbols-outlined {
    font-size: 64px;
    opacity: 0.8;
}

.item-browser--list .item-thumb-wrapper {
    margin: 0;
    height: auto;
    background-color: transparent;
    border: none;
    border-radius: var(--radius-sm);
    position: static;
}

.item-browser--list .item-thumb-fallback {
    display: none;
}

.item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 2;
}

.item-browser--list .item-thumb {
    width: 40px;
    height: 40px;
}

.drive-item__meta {
    flex: 1;
    min-width: 0;
}

.item-name {
    display: block;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.item-browser--grid .item-name {
    font-size: 13px;
}

.drive-item:hover .item-name {
    text-decoration: underline;
}

.item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.drive-item__actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.drive-item:hover .drive-item__actions,
.drive-item:focus-within .drive-item__actions {
    opacity: 1;
}

.item-browser--grid .drive-item__actions {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-surface);
    padding: 4px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.drive-item__grid-actions {
    margin-left: auto;
    opacity: 0;
    color: var(--text-muted);
}
.drive-item:hover .drive-item__grid-actions,
.drive-item:focus-within .drive-item__grid-actions {
    opacity: 1;
}
.drive-item__grid-actions:hover {
    background-color: var(--bg-hover);
    color: var(--text-main);
}

.action-icon-btn {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: background-color 0.2s;
}

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

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state .material-symbols-outlined {
    font-size: 80px;
    color: var(--border-color);
    margin-bottom: 24px;
    font-variation-settings: 'FILL' 0, 'wght' 200;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* Forms */
.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.hidden {
    display: none !important;
}

/* Upload panel (bottom-right, Google-style) */
.upload-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: min(380px, calc(100vw - 32px));
    max-height: min(420px, 55vh);
    display: flex;
    flex-direction: column;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    z-index: 1800;
    background: #1a1a1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f0f0f2;
    font-size: 13px;
}

.upload-panel.hidden {
    display: none !important;
}

.upload-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 10px 14px;
    background: #2a2a30;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.upload-panel__title {
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.upload-panel__header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.upload-panel__icon-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.upload-panel__icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.upload-panel__chevron {
    transition: transform 0.2s ease;
}

.upload-panel--collapsed .upload-panel__chevron {
    transform: rotate(-90deg);
}

.upload-panel--collapsed .upload-panel__body {
    display: none;
}

.upload-panel__body {
    max-height: min(340px, 45vh);
    overflow-y: auto;
    background: #141416;
}

.upload-panel__list {
    padding: 8px 0;
}

.upload-panel__row {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.upload-panel__row:last-child {
    border-bottom: none;
}

.upload-panel__row-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.upload-panel__file-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #3a3a42;
    color: #e8e8ec;
}

.upload-panel__file-icon--pdf {
    background: #c62828;
    color: #fff;
}

.upload-panel__file-icon--image {
    color: #7cb342;
}

.upload-panel__file-icon .material-symbols-outlined {
    font-size: 22px;
}

.upload-panel__row-info {
    flex: 1;
    min-width: 0;
}

.upload-panel__name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.upload-panel__meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
}

.upload-panel__bar {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.upload-panel__bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: linear-gradient(90deg, #42a5f5, #66bb6a);
    transition: width 0.15s ease-out;
}

.upload-panel__row--complete .upload-panel__bar-fill {
    background: #66bb6a;
}

.upload-panel__row--error .upload-panel__bar-fill {
    background: #ef5350;
}

.upload-panel__state {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
}

.upload-panel__state .material-symbols-outlined {
    font-size: 22px;
}

.upload-panel__spin {
    animation: upload-spin 0.9s linear infinite;
}

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

.upload-panel__state--ok {
    color: #66bb6a;
}

.upload-panel__state--err {
    color: #ef5350;
}

/* Drag-and-drop highlight on drive workspace */
.js-drive-workspace.upload-drop--active,
.js-upload-drop-zone.upload-drop--active {
    outline: 2px dashed var(--accent, #42a5f5);
    outline-offset: -4px;
    border-radius: var(--radius-md, 8px);
}

/* Context Menu */
.context-menu {
    position: fixed;
    z-index: 1000;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    min-width: 240px;
    user-select: none;
}

.context-menu.hidden {
    display: none !important;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-main);
    position: relative;
    transition: background-color 0.1s;
}

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

.menu-item .material-symbols-outlined {
    font-size: 20px;
    color: var(--text-muted);
}

.menu-item-danger {
    color: var(--danger);
}

.menu-item-danger .material-symbols-outlined {
    color: var(--danger);
}

.menu-text {
    flex: 1;
}

.menu-shortcut {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
}

/* Share modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-dialog {
    width: 100%;
    max-width: 480px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: min(90vh, calc(100dvh - 48px));
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.modal-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-dialog__header h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-dialog__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.modal-field__row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-prefix {
    font-family: ui-monospace, monospace;
    font-size: 13px;
    color: var(--text-light);
}

.modal-input,
.modal-textarea {
    flex: 1;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
}

.modal-textarea {
    resize: vertical;
    font-family: inherit;
}

.modal-hint {
    font-size: 12px;
    color: var(--text-light);
}

.modal-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
}

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

/* Prompt / confirm / alert: footer is a sibling of __body, not inside it */
.modal-dialog > .modal-actions {
    flex-shrink: 0;
    margin-top: 0;
    padding: 12px 20px 20px;
    border-top: 1px solid var(--border-color);
}

/* —— File Sharing modal (dark panel) —— */
.share-modal-overlay {
    background: rgba(0, 0, 0, 0.55);
}

.share-modal-dialog {
    width: 100%;
    max-width: 440px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    max-height: min(90vh, calc(100dvh - 48px));
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    color: #e6edf3;
    font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.share-modal-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 18px 20px 14px;
}

.share-modal-dialog__header h2 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    color: #f0f6fc;
    letter-spacing: 0.01em;
}

.share-modal-dialog__header .icon-btn {
    color: #8b949e;
}

.share-modal-dialog__header .icon-btn:hover {
    color: #e6edf3;
    background: rgba(240, 246, 252, 0.08);
}

.share-modal-dialog__divider {
    height: 1px;
    background: #21262d;
    margin: 0;
}

.share-modal-dialog__body {
    padding: 8px 0 16px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.share-modal__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    border-bottom: 1px solid #21262d;
}

.share-modal__row--spaced {
    margin-top: 8px;
}

.share-modal__row-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.share-modal__row-title {
    font-size: 14px;
    font-weight: 500;
    color: #f0f6fc;
}

.share-modal__row-icon {
    font-size: 18px;
    color: #8b949e;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* Toggle switch */
.share-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.share-switch__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #30363d;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.share-switch__slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #f0f6fc;
    border-radius: 50%;
    transition: transform 0.22s ease;
}

.share-switch input:checked + .share-switch__slider {
    background: #1f6feb;
}

.share-switch input:checked + .share-switch__slider::before {
    transform: translateX(20px);
}

.share-switch input:focus-visible + .share-switch__slider {
    outline: 2px solid #58a6ff;
    outline-offset: 2px;
}

.share-modal__expand {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.42s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease;
}

.share-modal__expand.is-open {
    max-height: 2000px;
    opacity: 1;
}

.share-modal__expand-inner {
    padding: 0 20px 8px;
    border-bottom: 1px solid #21262d;
}

.share-modal__link-box {
    display: flex;
    align-items: stretch;
    margin-top: 4px;
    border-radius: 8px;
    background: #161b22;
    border: 1px solid #30363d;
    overflow: hidden;
}

.share-modal__link-text {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
    color: #c9d1d9;
    word-break: break-all;
}

.share-modal__copy-btn {
    flex-shrink: 0;
    width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #21262d;
    color: #8b949e;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.share-modal__copy-btn:hover {
    background: #30363d;
    color: #f0f6fc;
}

.share-modal__copy-btn .material-symbols-outlined {
    font-size: 20px;
}

.share-modal__link-action {
    margin: 10px 0 4px;
    padding: 0;
    border: none;
    background: none;
    color: #58a6ff;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.share-modal__link-action:hover {
    color: #79c0ff;
}

.share-modal__section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 13px;
    font-weight: 600;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.share-modal__section-title--plain {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 600;
    color: #e6edf3;
    margin-top: 12px;
}

.share-modal__slug-label {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: #8b949e;
}

.share-modal__slug-row {
    display: flex;
    align-items: center;
    margin-top: 6px;
    border-radius: 8px;
    border: 1px solid #30363d;
    background: #0d1117;
    overflow: hidden;
}

.share-modal__host {
    flex-shrink: 0;
    padding: 9px 0 9px 10px;
    font-family: ui-monospace, "Cascadia Code", Menlo, monospace;
    font-size: 12px;
    color: #6e7681;
    max-width: 52%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-modal__slug-input {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    border: none;
    background: #161b22;
    color: #e6edf3;
    font-family: ui-monospace, "Cascadia Code", Menlo, monospace;
    font-size: 13px;
    outline: none;
}

.share-modal__password-input {
    border-radius: 8px;
    border: 1px solid #30363d;
    background: #161b22;
    width: 100%;
    box-sizing: border-box;
}

.share-modal__hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: #6e7681;
    line-height: 1.45;
}

.share-modal__hint code {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    color: #8b949e;
}

.share-modal__preview {
    margin-top: 10px;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 12px;
    color: #58a6ff;
    word-break: break-all;
    min-height: 1.2em;
}

.share-modal__token-status {
    margin-top: 6px;
    font-size: 12px;
    min-height: 1.2em;
}

.share-modal__token-status--ok {
    color: #3fb950;
}

.share-modal__token-status--bad {
    color: #f85149;
}

.share-modal__token-status--muted {
    color: #6e7681;
}

.share-modal__password-wrap {
    margin-top: 8px;
}

.share-modal__expires {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    padding: 0 0 8px;
}

.share-modal__expires-label {
    font-size: 12px;
    color: #8b949e;
}

.share-modal__expires-input {
    padding: 9px 10px;
    border-radius: 8px;
    border: 1px solid #30363d;
    background: #161b22;
    color: #e6edf3;
    font-size: 13px;
}

.share-modal__folder-invite {
    padding: 8px 20px 16px;
}

.share-modal__invite-btn {
    flex-shrink: 0;
    background: #21262d;
    color: #e6edf3;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    cursor: pointer;
}

.share-modal__invite-btn:hover {
    background: #30363d;
}

.share-modal-dialog__footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px 20px;
    flex-shrink: 0;
}

.share-modal__btn {
    flex: 1;
    max-width: 160px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.share-modal__btn--secondary {
    background: #21262d;
    border-color: #30363d;
    color: #e6edf3;
}

.share-modal__btn--secondary:hover {
    background: #30363d;
}

.share-modal__btn--primary {
    background: #1f6feb;
    border-color: #388bfd;
    color: #fff;
}

.share-modal__btn--primary:hover {
    background: #388bfd;
}

/* Share link password gate (public) */
.share-unlock-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 24px;
}

.share-unlock-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-lg);
}

.share-unlock-card__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.share-unlock-card__hint {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0 0 16px;
}

.share-unlock-card__label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.share-unlock-card__input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 14px;
    margin-bottom: 16px;
}

.share-unlock-card__submit {
    width: 100%;
}

.menu-arrow {
    margin-left: auto;
}

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

/* Submenu */
.has-submenu > .context-submenu {
    position: absolute;
    top: 0;
    left: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    min-width: 200px;
    display: none;
}

.has-submenu:hover > .context-submenu {
    display: block;
}

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

.upload-status--error {
    border-left: 4px solid var(--danger);
}

/* Full-screen file preview (Drive-style overlay) */
.file-preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.file-preview-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    z-index: 0;
}

.file-preview-overlay__frame {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
}

.file-preview-overlay__banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 10px 16px;
    background: rgba(30, 30, 35, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.file-preview-overlay__banner--warning {
    color: #ffcdd2;
}

.file-preview-overlay__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    min-height: 52px;
    padding: 8px 12px 8px 8px;
    background: rgba(22, 22, 26, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.file-preview-overlay__topbar-left {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.file-preview-overlay__back {
    color: rgba(255, 255, 255, 0.85);
    flex-shrink: 0;
}

.file-preview-overlay__back:hover {
    background: rgba(255, 255, 255, 0.08);
}

.file-preview-overlay__title-block {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.file-preview-overlay__file-icon {
    font-size: 26px;
    color: rgba(255, 255, 255, 0.55);
    flex-shrink: 0;
}

.file-preview-overlay__filename {
    font-size: 15px;
    font-weight: 500;
    color: #f1f1f3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-overlay__topbar-right {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.file-preview-overlay__action-icon {
    color: rgba(255, 255, 255, 0.82);
}

.file-preview-overlay__action-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.file-preview-overlay__action-icon--danger:hover {
    background: rgba(244, 67, 54, 0.2);
    color: #ffab91;
}

.file-preview-overlay__more-wrap {
    position: relative;
}

.file-preview-overlay__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    padding: 8px 0;
    background: #2d2d32;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    z-index: 10;
}

.file-preview-overlay__menu.hidden {
    display: none !important;
}

.file-preview-overlay__menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: #eee;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.file-preview-overlay__menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.file-preview-overlay__menu-item .material-symbols-outlined {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.65);
}

.file-preview-overlay__menu-item--danger {
    color: #ffab91;
}

.file-preview-overlay__menu-divider {
    height: 1px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.08);
}

.file-preview-overlay__body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.file-preview-overlay__stage {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #0c0c0e;
    position: relative;
}

.file-preview-overlay__preview-inner {
    flex: 1;
    min-height: 0;
    width: 100%;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: #0c0c0e !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.file-preview-overlay__preview-inner:has(.video-section) {
    align-items: center;
    justify-content: center;
    padding: 24px !important;
}

.file-preview-overlay__preview-inner:has(.media-preview) {
    padding: 24px !important;
}

.file-preview-overlay__preview-inner:has(.document-preview) {
    align-items: stretch;
    justify-content: stretch;
}

.file-preview-overlay__stage .document-preview {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: 100%;
}

.file-preview-overlay__stage .text-preview {
    max-height: none;
}

.file-preview-overlay__audio-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 32px;
    width: 100%;
    height: 100%;
}

.file-preview-overlay__audio-icon {
    font-size: 64px;
    color: rgba(255, 255, 255, 0.35);
}

.file-preview-overlay__audio-el {
    width: min(560px, 100%);
    accent-color: var(--accent);
}

.file-preview-overlay__sidebar {
    flex-shrink: 0;
    width: 0;
    overflow: hidden;
    background: #1a1a1f;
    border-left: none;
    transition: width 0.22s ease, border-color 0.22s ease;
}

.file-preview-overlay--details-open .file-preview-overlay__sidebar {
    width: 320px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.file-preview-overlay__sidebar-inner {
    width: 320px;
    padding: 20px;
    box-sizing: border-box;
}

.file-preview-overlay__sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.file-preview-overlay__sidebar-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #f0f0f2;
}

body.has-file-preview-page {
    overflow: hidden;
}

body.has-shared-view-page .sidebar,
body.has-shared-view-page .topbar {
    display: none;
}

body.has-shared-view-page .main-wrapper {
    width: 100%;
}

body.has-shared-view-page .content-shell {
    padding: 0;
    overflow: hidden;
}

body.has-shared-view-page main.main-content {
    min-height: 100vh;
}

.shared-view .file-preview-overlay__frame {
    background: #0c0c0e;
}

.shared-view--folder .file-preview-overlay__frame {
    background: var(--bg-main);
}

.shared-view__public-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
}

.shared-view__public-badge .material-symbols-outlined {
    color: #fff;
}

.shared-folder-view {
    flex: 1;
    min-height: 0;
    padding: 24px;
    overflow: auto;
}

.shared-folder-list {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    overflow: hidden;
}

.shared-folder-list__header,
.shared-folder-list__row {
    display: grid;
    grid-template-columns: minmax(240px, 2.4fr) minmax(140px, 1.2fr) 100px 100px 56px;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
}

.shared-folder-list__header {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border-color);
}

.shared-folder-list__row {
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.shared-folder-list__row:last-child {
    border-bottom: none;
}

.shared-folder-list__row:hover {
    background: var(--bg-hover);
}

.shared-folder-list__name {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    font-weight: 500;
}

.shared-folder-list__name .material-symbols-outlined {
    flex-shrink: 0;
}

.shared-folder-list__meta {
    font-size: 13px;
    color: var(--text-muted);
}

.shared-folder-list__action {
    display: flex;
    justify-content: flex-end;
}

.shared-view__download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #111318;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.shared-view__download-btn:hover {
    background: #f3f4f6;
    color: #111318;
}

.shared-view__download-btn .material-symbols-outlined {
    color: inherit;
    font-size: 18px;
}

.shared-view .js-shared-info {
    transform: translateX(-10px);
}

@media (max-width: 768px) {
    .file-preview-overlay__topbar {
        flex-wrap: wrap;
    }
    .file-preview-overlay__body {
        flex-direction: column;
    }
    .file-preview-overlay--details-open .file-preview-overlay__sidebar {
        width: 100%;
        max-height: 45vh;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .file-preview-overlay__sidebar-inner {
        width: 100%;
    }
    .shared-folder-view {
        padding: 16px;
    }
    .shared-folder-list__header,
    .shared-folder-list__row {
        grid-template-columns: minmax(0, 1fr) 92px 48px;
    }
    .shared-folder-list__header div:nth-child(2),
    .shared-folder-list__row div:nth-child(2) {
        display: none;
    }
    .shared-folder-list__header div:nth-child(4),
    .shared-folder-list__row div:nth-child(4) {
        display: none;
    }
}

/* Item View Layout */
.item-layout {
    display: flex;
    gap: 24px;
    min-height: 0;
    height: calc(100vh - var(--header-height) - 100px);
}

.item-layout.item-layout--fill {
    flex: 1;
    height: auto;
    min-height: min(520px, calc(100vh - var(--header-height) - 160px));
}

.preview-panel {
    flex: 1;
    min-width: 0;
    min-height: 0;
    background-color: var(--bg-hover);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
    padding: 20px;
    transition: background-color 0.35s ease;
}

.preview-panel:has(.video-section) {
    padding: 12px;
    align-items: stretch;
    justify-content: stretch;
    flex-direction: column;
}

.preview-panel:has(.video-section.is-playing) {
    background-color: var(--bg-surface);
}

.preview-panel:has(.video-section:not(.is-playing)) {
    background-color: var(--bg-hover);
}

.preview-panel:has(.document-preview) {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}

.preview-panel .document-preview {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: 100%;
}

.media-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.video-player__video.media-preview {
    max-width: none;
    max-height: none;
}

.video-section.video-player {
    --video-aspect: 1.7778;
    flex: 0 1 auto;
    align-self: center;
    min-width: 0;
    min-height: 0;
    width: min(100%, calc((100vh - 180px) * var(--video-aspect)));
    max-width: 100%;
    max-height: calc(100vh - 180px);
    height: auto;
    aspect-ratio: var(--video-aspect);
    display: flex;
    flex-direction: column;
    background: #000;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.video-container {
    flex: 1;
    width: 100%;
    min-height: 0;
    min-width: 0;
    position: relative;
}

.video-player__surface {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}

.video-player__video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    display: block;
    object-fit: contain;
    background: #000;
}

.video-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse 85% 75% at 50% 45%, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.72) 100%);
    opacity: 1;
    transition: opacity 0.35s ease;
}

.video-section.is-playing .video-overlay {
    opacity: 0.28;
}

.video-player__overlay-play {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(15, 15, 15, 0.7);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: opacity 0.2s, transform 0.2s;
}

.video-player__overlay-play .material-symbols-outlined {
    font-size: 40px;
}

.video-player__loading {
    position: absolute;
    inset: 16px 16px auto 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(20, 20, 20, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.video-player.is-ready .video-player__loading,
.video-player.has-error .video-player__loading {
    display: none;
}

.spin {
    animation: spin 1s linear infinite;
}

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

.video-section.is-playing .video-player__overlay-play {
    opacity: 0;
    pointer-events: none;
}

.control-bar.video-player__controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 16px;
    margin: 0;
    border-radius: 0;
    border: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.video-section:hover .control-bar.video-player__controls,
.video-section:focus-within .control-bar.video-player__controls {
    opacity: 1;
    pointer-events: auto;
}

@media (hover: none) {
    .video-section .control-bar.video-player__controls {
        opacity: 1;
        pointer-events: auto;
    }
}

.control-bar.video-player__controls .video-player__control {
    color: #fff;
}

.control-bar.video-player__controls .video-player__time {
    color: rgba(255, 255, 255, 0.88);
}

.video-player__control {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-main);
    display: grid;
    place-items: center;
    cursor: pointer;
}

.video-section .video-player__control:hover,
.video-section .video-player__overlay-play:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.video-player__time {
    min-width: 40px;
    font-size: 12px;
    color: var(--text-light);
    font-variant-numeric: tabular-nums;
}

.video-player__seek,
.video-player__volume {
    accent-color: var(--accent);
}

.video-player__seek {
    flex: 1;
    min-width: 120px;
}

.video-player__volume {
    width: 96px;
}

.video-player__error {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
}

.video-player.has-error .video-player__error {
    display: flex;
}

.video-player__error strong {
    display: block;
    margin-bottom: 4px;
}

.video-player__error p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.document-preview {
    width: 100%;
    height: 100%;
    border: none;
    background-color: white; /* PDF viewer often needs white background */
}

.text-preview {
    width: 100%;
    height: 100%;
    padding: 24px;
    overflow: auto;
    background-color: var(--bg-surface);
    font-family: monospace;
    font-size: 14px;
    color: var(--text-main);
    white-space: pre-wrap;
    margin: 0;
}

.detail-panel {
    width: 320px;
    flex-shrink: 0;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    overflow-y: auto;
    transition: width 0.25s ease, padding 0.25s ease;
}

.detail-panel--collapsed {
    width: 56px;
    padding: 12px 8px;
}

.detail-panel__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 0 16px;
    margin: 0 0 16px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    border-radius: var(--radius-md);
}

.detail-panel__toggle:hover {
    color: var(--accent);
}

.detail-panel__toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.detail-panel__toggle-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.detail-panel__toggle-label {
    flex: 1;
    min-width: 0;
}

.detail-panel__chevron {
    margin-left: auto;
    font-size: 22px;
    flex-shrink: 0;
    opacity: 0.7;
}

.detail-panel--collapsed .detail-panel__toggle {
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    border-bottom: none;
    justify-content: center;
}

.detail-panel--collapsed .detail-panel__toggle-label,
.detail-panel--collapsed .detail-panel__chevron {
    display: none;
}

.detail-panel--collapsed .detail-panel__body {
    display: none;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-list div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-list dt {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-list dd {
    font-size: 14px;
    color: var(--text-main);
    margin: 0;
    word-break: break-word;
}

/* Dropdown styling */
.upload-btn-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.upload-btn-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

@media (max-width: 768px) {
    .app-shell {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    .main-wrapper {
        margin-top: 0;
        border-radius: 0;
        border: none;
    }
    .item-layout {
        flex-direction: column;
        height: auto;
    }
    .video-section.video-player {
        width: 100%;
        min-height: 220px;
    }
    .control-bar.video-player__controls {
        flex-wrap: wrap;
    }
    .video-player__volume {
        width: 100%;
        order: 2;
    }
    .detail-panel,
    .detail-panel--collapsed {
        width: 100%;
    }
    .topbar-search {
        display: none; /* Hide search on mobile for simplicity */
    }
}

/* Auth (login / signup) */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-shell {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
}

.auth-brand__title {
    font-size: 1.25rem;
    font-weight: 600;
}

.auth-heading {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.auth-sub {
    color: var(--text-muted);
    font-size: 0.9375rem;
    text-align: center;
    margin-bottom: 24px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-field input {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
}

.auth-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(11, 87, 208, 0.15);
}

.auth-submit {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.auth-flashes {
    margin-bottom: 16px;
}

.auth-flashes .flash {
    margin-bottom: 8px;
}

.topbar-logout-form {
    display: inline;
    margin: 0;
}

.user-chip {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-right: 4px;
}

.btn--sm {
    padding: 6px 12px;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
}

/* —— File sharing modal (share-file-*) —— */
.share-file-modal-overlay {
    background: rgba(0, 0, 0, 0.45);
}

.share-file-modal {
    width: 100%;
    max-width: 440px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    max-height: min(90vh, calc(100dvh - 48px));
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    color: var(--text-main);
}

.share-file-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: 18px 20px 14px;
}

.share-file-modal__header h2 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    color: var(--text-main);
}

.share-file-modal__header .icon-btn {
    color: var(--text-muted);
}

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

.share-file-modal__divider {
    display: none; /* Removed divider line */
}

.share-file-modal__body {
    padding: 8px 0 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: none;
}

.share-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 20px; /* Reduced vertical padding slightly for better feel */
    border-bottom: none; /* Removed as requested */
}

.share-file-row:last-child {
    border-bottom: none;
}

.share-file-row__left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.share-file-row__title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
}

.share-file-row__icon {
    font-size: 20px;
    color: var(--text-muted);
}

.share-file-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.share-file-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.share-file-toggle__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border-color);
    border-radius: 999px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-file-toggle__slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.share-file-toggle input:checked + .share-file-toggle__slider {
    background: #1f6feb; /* Dark blue as requested */
}

.share-file-toggle input:checked + .share-file-toggle__slider::before {
    transform: translateX(20px);
}

.share-file-toggle input:focus-visible + .share-file-toggle__slider {
    outline: 2px solid #58a6ff;
    outline-offset: 2px;
}

/* Smooth expand/collapse for toggle sections */
.share-expand {
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.25s ease-out, opacity 0.2s ease-out, padding 0.25s ease-out;
}

.share-expand.is-open {
    max-height: 400px;
    opacity: 1;
    padding-top: 4px;
    transition: max-height 0.3s ease-in-out, opacity 0.2s ease-in, padding 0.25s ease-in;
}

.share-expand__inner {
    min-height: 0;
}

.share-modal-when-enabled {
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.28s ease-out, opacity 0.2s ease-out;
}

.share-modal-when-enabled.is-open {
    max-height: 800px;
    opacity: 1;
    transition: max-height 0.35s ease-in-out, opacity 0.2s ease-in;
}

.share-modal-when-enabled__inner {
    min-height: 0;
}

.share-url-box {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    margin: 8px 20px 12px;
    border-radius: 8px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    overflow: hidden;
    text-align: left;
}

.share-url-box--preview {
    margin: 10px 0 0 0;
    text-align: left;
}

.share-url-box--preview .share-url-box__input,
.share-url-box .share-url-box__input {
    text-align: left !important;
}

.share-url-box__input,
.share-url-box__input[readonly],
input.share-url-box__input,
#share-modal-preview-url,
#share-url-input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: none;
    background: transparent;
    font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-main);
    word-break: break-all;
    outline: none;
    text-align: left !important;
    -webkit-text-align: left;
    -moz-text-align-last: left;
    text-align-last: left;
    direction: ltr;
    text-indent: 0;
}

.share-url-box__copy {
    flex-shrink: 0;
    width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.share-url-box__copy:hover {
    background: var(--bg-active);
    color: var(--accent);
}

.share-url-box__copy .material-symbols-outlined {
    font-size: 20px;
}

.share-custom-fields {
    padding: 0 20px 12px;
}

.share-file-label {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.share-file-input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.share-file-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--bg-active);
}

.share-file-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.45;
}

.share-file-hint code {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    background: var(--bg-hover);
    padding: 2px 4px;
    border-radius: 4px;
}

.share-token-status {
    margin-top: 8px;
    font-size: 12px;
    min-height: 1.2em;
}

.share-token-status--ok {
    color: var(--success);
}

.share-token-status--bad {
    color: var(--danger);
}

.share-password-fields {
    padding: 0 20px 12px;
}

.share-file-hr {
    display: none;
}

.share-with-user-block {
    padding: 16px 20px 20px;
    border-top: none; /* Removed as requested */
    background: var(--bg-hover);
}

.share-with-user-block__title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.share-with-user-block__row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.share-with-user-block__email {
    margin-top: 0;
    flex: 1;
}

.share-with-user-block__send {
    flex-shrink: 0;
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.share-with-user-block__send:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}

.share-file-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 20px 20px;
    flex-shrink: 0;
    border: none;
    border-top: none;
    box-shadow: none;
    background: var(--bg-surface);
}

.share-file-btn {
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.share-file-btn--secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.share-file-btn--secondary:hover {
    background: var(--bg-hover);
}

.share-file-btn--primary {
    background: #1f6feb; /* Explicit dark blue as requested */
    color: #fff;
}

.share-file-btn--primary:hover {
    background: #388bfd;
    box-shadow: var(--shadow-sm);
}

/* Standalone share unlock (minimal dark) */
.share-unlock-standalone {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1117;
    color: #e6edf3;
    font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
}

.share-unlock-standalone__inner {
    width: 100%;
    max-width: 400px;
    padding: 32px 24px;
    background: #12161d;
    border: 1px solid #2a3140;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.share-unlock-standalone__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 16px;
    color: #f0f6fc;
}

.share-unlock-standalone__error {
    color: #f85149;
    font-size: 0.875rem;
    margin: 0 0 12px;
}

.share-unlock-standalone__label {
    display: block;
    font-size: 0.8125rem;
    color: #8b949e;
    margin-bottom: 6px;
}

.share-unlock-standalone__input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #30363d;
    background: #0d1117;
    color: #e6edf3;
    font-size: 1rem;
    margin-bottom: 16px;
}

.share-unlock-standalone__submit {
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #1f6feb;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
}

.share-unlock-standalone__submit:hover {
    background: #388bfd;
}

/* ===== Move Dialog (Google Drive Style) ===== */
.move-dialog {
    background: #1e1f20;
    color: #e3e3e3;
    border-radius: 24px;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.move-dialog__header {
    padding: 24px 24px 0;
    flex-shrink: 0;
}

.move-dialog__title {
    font-size: 1.375rem;
    font-weight: 400;
    margin: 0 0 16px;
    color: #e3e3e3;
    line-height: 1.3;
}

.move-dialog__current-location {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: #c4c7c5;
    margin-bottom: 20px;
}

.move-dialog__current-label {
    color: #9aa0a6;
}

.move-dialog__location-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #747775;
    border-radius: 8px;
    background: transparent;
    color: #e3e3e3;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.move-dialog__location-btn:hover {
    background: #282a2c;
}

.move-dialog__location-btn .material-symbols-outlined {
    font-size: 18px;
    color: #9aa0a6;
}

.move-dialog__tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #444746;
}

.move-dialog__tabs-list {
    display: flex;
    gap: 24px;
}

.move-dialog__tab {
    position: relative;
    padding: 12px 4px;
    background: none;
    border: none;
    color: #9aa0a6;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
}

.move-dialog__tab:hover {
    color: #e3e3e3;
}

.move-dialog__tab--active {
    color: #a8c7fa;
}

.move-dialog__tab--active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: #a8c7fa;
    border-radius: 3px 3px 0 0;
}

.move-dialog__tabs-actions {
    display: flex;
    gap: 4px;
}

.move-dialog__tabs-actions .icon-btn {
    color: #9aa0a6;
}

.move-dialog__tabs-actions .icon-btn:hover {
    background: #282a2c;
    color: #e3e3e3;
}

.move-dialog__search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-top: 12px;
    background: #282a2c;
    border-radius: 24px;
}

.move-dialog__search .material-symbols-outlined {
    color: #9aa0a6;
    font-size: 20px;
}

.move-dialog__search input {
    flex: 1;
    background: none;
    border: none;
    color: #e3e3e3;
    font-size: 0.875rem;
    outline: none;
}

.move-dialog__search input::placeholder {
    color: #9aa0a6;
}

.move-dialog__search .icon-btn {
    padding: 4px;
}

.move-dialog__body {
    flex: 1;
    overflow-y: auto;
    min-height: 280px;
    max-height: 320px;
    padding: 8px 0;
}

.move-folder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.move-folder-item:hover {
    background: #282a2c;
}

.move-folder-item--selected {
    background: #37393b;
}

.move-folder-item--selected:hover {
    background: #37393b;
}

.move-folder-item__left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.move-folder-item__icon {
    flex-shrink: 0;
    font-size: 24px;
    color: #9aa0a6;
}

.move-folder-item__name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #c4c7c5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.move-folder-item--selected .move-folder-item__name {
    color: #e3e3e3;
}

.move-folder-item__drill {
    flex-shrink: 0;
    padding: 6px;
    border: none;
    background: none;
    color: #9aa0a6;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.move-folder-item__drill:hover {
    background: #444746;
    color: #e3e3e3;
}

.move-folder-item__drill .material-symbols-outlined {
    font-size: 20px;
}

.move-back-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 24px;
    cursor: pointer;
    transition: background 0.15s;
    color: #9aa0a6;
}

.move-back-item:hover {
    background: #282a2c;
    color: #e3e3e3;
}

.move-back-item .material-symbols-outlined {
    font-size: 20px;
}

.move-back-item span {
    font-size: 0.875rem;
    font-weight: 500;
}

.move-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #9aa0a6;
    text-align: center;
    padding: 24px;
}

.move-empty-state .material-symbols-outlined {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.move-empty-state p {
    font-size: 0.875rem;
}

.move-dialog__footer {
    padding: 16px 24px 24px;
    border-top: 1px solid #444746;
    flex-shrink: 0;
}

.move-dialog__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #9aa0a6;
    margin-bottom: 20px;
    min-height: 24px;
    flex-wrap: wrap;
}

.move-dialog__breadcrumb .material-symbols-outlined {
    font-size: 18px;
    flex-shrink: 0;
}

.move-dialog__breadcrumb-item {
    color: #9aa0a6;
}

.move-dialog__breadcrumb-item--current {
    color: #e3e3e3;
    font-weight: 500;
}

.move-dialog__breadcrumb-sep {
    color: #747775;
    margin: 0 4px;
}

.move-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.move-dialog__actions .btn-text {
    padding: 10px 24px;
    background: transparent;
    border: none;
    color: #a8c7fa;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.15s;
}

.move-dialog__actions .btn-text:hover {
    background: #282a2c;
}

.move-dialog__actions .btn-primary {
    padding: 10px 24px;
    background: #333537;
    border: none;
    color: #747775;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 24px;
    cursor: not-allowed;
    transition: all 0.15s;
}

.move-dialog__actions .btn-primary:not(:disabled) {
    background: #a8c7fa;
    color: #041e49;
    cursor: pointer;
}

.move-dialog__actions .btn-primary:not(:disabled):hover {
    background: #b5d0fc;
}

/* ===== Navigation Divider ===== */
.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 16px;
}

/* ===== Migration Interface ===== */
.migration-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.migration-container--full {
    max-width: none;
    padding: 16px 24px;
}

.migration-header {
    margin-bottom: 32px;
}

.migration-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.75rem;
    font-weight: 400;
    margin: 0 0 8px;
    color: var(--text-main);
}

.migration-title .material-symbols-outlined {
    font-size: 32px;
    color: var(--accent);
}

.migration-subtitle {
    color: var(--text-muted);
    margin: 0;
}

.migration-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
}

.migration-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.migration-section__title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.migration-section__title h2 {
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
}

.migration-section__title .material-symbols-outlined {
    font-size: 24px;
}

.migration-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
}

.migration-status .material-symbols-outlined {
    font-size: 18px;
}

.migration-status--connected {
    background: rgba(46, 160, 67, 0.15);
    color: #3fb950;
}

.migration-status--disconnected {
    background: rgba(248, 81, 73, 0.15);
    color: #f85149;
}

/* Auth Card */
.migration-auth-card {
    padding: 32px;
    text-align: center;
}

.migration-auth-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
}

.migration-auth-card__icon svg {
    width: 100%;
    height: 100%;
}

.migration-auth-card h3 {
    font-size: 1.25rem;
    margin: 0 0 8px;
}

.migration-auth-card > p {
    color: var(--text-muted);
    margin: 0 0 24px;
}

.migration-auth-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 500px;
    margin: 0 auto 24px;
    text-align: left;
}

.migration-auth-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.migration-auth-step__number {
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.migration-auth-step__content {
    flex: 1;
}

.migration-auth-step__content strong {
    display: block;
    margin-bottom: 4px;
}

.migration-auth-step__content p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.migration-code-block {
    display: block;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 8px;
    font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
    font-size: 0.875rem;
    color: var(--text-main);
    user-select: all;
}

.migration-token-input {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.migration-token-input label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.migration-token-input textarea {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-main);
    font-family: "SF Mono", Monaco, monospace;
    font-size: 0.8125rem;
    resize: vertical;
    margin-bottom: 16px;
}

.migration-token-input textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Google Sign-in Button */
.google-signin-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: #fff;
    color: #1f1f1f;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.google-signin-btn:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.google-signin-btn__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.migration-auth-note {
    margin-top: 20px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Auth Error */
.migration-auth-error {
    max-width: 500px;
    margin: 60px auto;
    text-align: center;
    padding: 48px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.migration-auth-error__icon {
    margin-bottom: 20px;
}

.migration-auth-error__icon .material-symbols-outlined {
    font-size: 64px;
    color: #f85149;
}

.migration-auth-error h2 {
    margin: 0 0 12px;
    font-size: 1.5rem;
}

.migration-auth-error__type {
    font-weight: 500;
    color: #f85149;
    margin: 0 0 8px;
}

.migration-auth-error__description {
    color: var(--text-muted);
    margin: 0 0 24px;
}

/* Setup Required */
.migration-setup-required {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: left;
}

.migration-setup-required > .material-symbols-outlined {
    font-size: 32px;
    color: var(--accent);
    flex-shrink: 0;
}

.migration-setup-required > div {
    flex: 1;
}

.migration-setup-required strong {
    display: block;
    margin-bottom: 4px;
}

.migration-setup-required p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.migration-link-small {
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-decoration: underline;
}

.migration-link-small:hover {
    color: var(--text-main);
}

/* Setup Page */
.migration-setup-card {
    padding: 32px;
}

.migration-setup-card h2 {
    font-size: 1.25rem;
    margin: 0 0 8px;
}

.migration-setup-card > p {
    color: var(--text-muted);
    margin: 0 0 32px;
}

.migration-setup-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.migration-setup-step {
    display: flex;
    gap: 16px;
}

.migration-setup-step__number {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.migration-setup-step__content {
    flex: 1;
}

.migration-setup-step__content h3 {
    font-size: 1rem;
    font-weight: 500;
    margin: 4px 0 8px;
}

.migration-setup-step__content p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0 0 8px;
}

.migration-setup-step__content ul {
    margin: 8px 0 0;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.migration-setup-step__content ul li {
    margin-bottom: 4px;
}

.migration-link {
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

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

.migration-link .material-symbols-outlined {
    font-size: 16px;
}

.migration-code-block--copyable {
    display: inline-block;
    margin-right: 8px;
    word-break: break-all;
}

/* Credentials Form */
.migration-credentials-form {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.migration-form-field {
    margin-bottom: 20px;
    position: relative;
}

.migration-form-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.migration-form-field input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9375rem;
}

.migration-form-field input:focus {
    outline: none;
    border-color: var(--accent);
}

.migration-toggle-secret {
    position: absolute;
    right: 12px;
    top: 38px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.migration-toggle-secret:hover {
    color: var(--text-main);
}

.migration-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Dual Pane Layout */
.migration-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.migration-header__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.migration-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.migration-dual-pane {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.migration-pane {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.migration-pane__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.migration-pane__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.migration-pane__logo {
    width: 20px;
    height: 20px;
}

.migration-pane__header-actions {
    display: flex;
    gap: 4px;
}

.migration-pane__path {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-color);
    min-height: 40px;
}

.migration-path-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 0.8125rem;
    border-radius: 4px;
    cursor: pointer;
}

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

.migration-path-item .material-symbols-outlined {
    font-size: 16px;
}

.migration-path-sep {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.migration-pane__content {
    flex: 1;
    overflow-y: auto;
    min-height: 280px;
    max-height: 350px;
}

.migration-pane__footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.migration-file-list {
    display: flex;
    flex-direction: column;
}

.migration-file-row {
    display: grid;
    grid-template-columns: 32px 28px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.1s;
}

.migration-file-row:last-child {
    border-bottom: none;
}

.migration-file-row:hover {
    background: var(--bg-hover);
}

.migration-file-row--selected {
    background: rgba(31, 111, 235, 0.15);
}

.migration-file-row--selected:hover {
    background: rgba(31, 111, 235, 0.2);
}

.migration-file-row__check {
    display: flex;
    align-items: center;
    justify-content: center;
}

.migration-file-row__check input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.migration-file-row__spacer {
    width: 16px;
}

.migration-file-row__icon {
    font-size: 22px;
    color: var(--text-muted);
}

.migration-file-row--folder .migration-file-row__icon {
    color: #8ab4f8;
}

.migration-file-row__name {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.migration-file-row__size {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Transfer Actions */
.migration-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 16px 0;
}

.migration-transfer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s;
}

.migration-transfer-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.migration-transfer-btn:disabled {
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: not-allowed;
}

.migration-transfer-btn .material-symbols-outlined {
    font-size: 24px;
}

/* Transfers Section */
.migration-transfers-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.migration-transfers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.migration-transfers-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    margin: 0;
}

.migration-transfers-header h2 .material-symbols-outlined {
    font-size: 20px;
}

.migration-transfers-list {
    max-height: 250px;
    overflow-y: auto;
}

.migration-transfer {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.migration-transfer:last-child {
    border-bottom: none;
}

.migration-transfer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.migration-transfer__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: capitalize;
}

.migration-transfer__status .material-symbols-outlined {
    font-size: 18px;
}

.migration-transfer--running .migration-transfer__status {
    color: var(--accent);
}

.migration-transfer--completed .migration-transfer__status {
    color: #3fb950;
}

.migration-transfer--error .migration-transfer__status {
    color: #f85149;
}

.migration-transfer--starting .migration-transfer__status {
    color: var(--text-muted);
}

.migration-transfer__meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.migration-transfer__file {
    font-size: 0.8125rem;
    color: var(--text-main);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.migration-transfer__progress {
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.migration-transfer__progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.migration-transfer__stats {
    display: flex;
    gap: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.migration-transfer__error {
    font-size: 0.8125rem;
    color: #f85149;
    margin-top: 6px;
}

.migration-empty-state--small {
    flex-direction: row;
    padding: 24px;
    gap: 12px;
}

.migration-empty-state--small .material-symbols-outlined {
    font-size: 24px;
    margin-bottom: 0;
}

/* File Browser */
.migration-browser {
    display: flex;
    flex-direction: column;
}

.migration-browser__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-elevated);
}

.migration-browser__path {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.migration-path-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 0.875rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

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

.migration-path-btn .material-symbols-outlined {
    font-size: 18px;
}

.migration-path-sep {
    color: var(--text-muted);
}

.migration-browser__actions {
    display: flex;
    gap: 8px;
}

.migration-btn--danger {
    color: #f85149 !important;
}

.migration-btn--danger:hover {
    background: rgba(248, 81, 73, 0.15) !important;
}

.migration-browser__content {
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
}

.migration-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px;
    color: var(--text-muted);
}

.migration-error {
    padding: 24px;
    text-align: center;
    color: #f85149;
}

.migration-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--text-muted);
}

.migration-empty-state .material-symbols-outlined {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.migration-file-list {
    display: flex;
    flex-direction: column;
}

.migration-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}

.migration-file-item:last-child {
    border-bottom: none;
}

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

.migration-file-item--selected {
    background: rgba(31, 111, 235, 0.15);
}

.migration-file-item--selected:hover {
    background: rgba(31, 111, 235, 0.2);
}

.migration-file-item__checkbox {
    flex-shrink: 0;
}

.migration-file-item__checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.migration-file-item__icon {
    flex-shrink: 0;
    font-size: 24px;
    color: var(--text-muted);
}

.migration-file-item--folder .migration-file-item__icon {
    color: #8ab4f8;
}

.migration-file-item__name {
    flex: 1;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.migration-file-item__size {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    min-width: 80px;
    text-align: right;
}

.migration-browser__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-elevated);
    gap: 16px;
}

.migration-selection-info {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.migration-browser__footer-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.migration-dest-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.migration-dest-label input {
    width: 200px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 0.875rem;
}

.migration-dest-label input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Transfers List */
.migration-transfers {
    padding: 16px;
}

.migration-transfer-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.migration-transfer-item:last-child {
    margin-bottom: 0;
}

.migration-transfer-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.migration-transfer-item__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: capitalize;
}

.migration-transfer-item__status .material-symbols-outlined {
    font-size: 18px;
}

.migration-transfer-item__status--running {
    color: var(--accent);
}

.migration-transfer-item__status--completed {
    color: #3fb950;
}

.migration-transfer-item__status--error {
    color: #f85149;
}

.migration-transfer-item__time {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.migration-transfer-item__files {
    font-size: 0.875rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.migration-transfer-item__progress-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-family: "SF Mono", Monaco, monospace;
}

.migration-transfer-item__error {
    font-size: 0.875rem;
    color: #f85149;
    margin-top: 8px;
}