/* ==========================================================================
   DropVault Pro Design System — Luxury Obsidian & Electric Iris
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* ── Color Palette ── */
    --bg-base: #07080b;
    --bg-subtle: #0d0f17;
    --bg-surface: #121520;
    --bg-surface-hover: #171b29;
    --bg-surface-active: #1c2133;
    --bg-overlay: rgba(13, 15, 23, 0.82);

    /* ── Borders & Hairlines ── */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.09);
    --border-focus: rgba(99, 102, 241, 0.6);
    --border-card-hover: rgba(255, 255, 255, 0.16);

    /* ── Typography & Content ── */
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-disabled: #64748b;

    /* ── Accents (Electric Iris & Cyan) ── */
    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    --accent-primary-glow: rgba(99, 102, 241, 0.28);
    --accent-secondary: #06b6d4;
    --accent-secondary-glow: rgba(6, 182, 212, 0.25);

    /* ── Semantic States ── */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-border: rgba(16, 185, 129, 0.25);
    
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-border: rgba(245, 158, 11, 0.25);

    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.12);
    --error-border: rgba(239, 68, 68, 0.25);

    /* ── Radii ── */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 9999px;

    /* ── Shadows & Highlights ── */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 24px var(--accent-primary-glow);
    --specular-line: inset 0 1px 0 0 rgba(255, 255, 255, 0.07);

    /* ── Layout ── */
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 68px;
    --header-height: 64px;

    /* ── Typography ── */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}

body {
    background-image: 
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(99, 102, 241, 0.07), transparent 70%),
        radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.03), transparent 50%);
    background-repeat: no-repeat;
}

#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Utility Flex */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.self-start { align-self: flex-start; }
.hidden { display: none !important; }

/* ==========================================================================
   Layout Shell
   ========================================================================== */

.app-layout {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-width: 0;
    overflow: hidden;
    position: relative;
    background: transparent;
}

/* ==========================================================================
   Sidebar V2
   ========================================================================== */

.sidebar-v2 {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-subtle);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 40;
    flex-shrink: 0;
    user-select: none;
}

.sidebar-v2.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-brand-row {
    height: var(--header-height);
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    overflow: hidden;
}

.brand-emblem {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4), var(--specular-line);
    flex-shrink: 0;
}

.brand-text-block {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
}

.brand-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.brand-edition {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.sidebar-collapse-trigger {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.sidebar-collapse-trigger:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.sidebar-scrollable {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0.75rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.nav-group-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-disabled);
    padding: 0 0.75rem;
    margin-bottom: 0.35rem;
    display: block;
    white-space: nowrap;
}

.nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    position: relative;
    transition: all 0.15s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: #ffffff;
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.22);
}

.nav-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: inherit;
}

.nav-link.active .nav-link-icon {
    color: var(--accent-primary);
}

.active-indicator {
    position: absolute;
    right: 0.75rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

.sidebar-footer {
    padding: 0.85rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-storage-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.storage-info {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.storage-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.storage-val {
    color: var(--accent-secondary);
    font-size: 0.7rem;
    font-weight: 600;
}

.storage-meter {
    height: 5px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.storage-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.storage-progress-bar.warning {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}

.storage-progress-bar.critical {
    background: var(--error);
}

.sidebar-storage-card .storage-val {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.logout-link {
    cursor: pointer;
    background: none;
    border: 1px solid transparent;
    width: 100%;
    text-align: left;
    color: var(--text-muted);
}

.logout-link:hover {
    color: var(--error);
    background: var(--error-bg);
    border-color: var(--error-border);
}

/* Collapsed Sidebar Styles */
.sidebar-v2.collapsed .brand-text-block,
.sidebar-v2.collapsed .nav-group-title,
.sidebar-v2.collapsed .nav-link-label,
.sidebar-v2.collapsed .active-indicator,
.sidebar-v2.collapsed .sidebar-storage-card {
    display: none !important;
}

.sidebar-v2.collapsed .sidebar-brand-row {
    height: auto;
    min-height: var(--header-height);
    padding: 0.6rem 0;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
}

/* Keep the expand control reachable; collapsed state is persisted, so
   hiding it left the sidebar stuck collapsed. */
.sidebar-v2.collapsed .sidebar-collapse-trigger {
    display: flex;
}

.sidebar-v2.collapsed .nav-link {
    justify-content: center;
    padding: 0.65rem 0;
}

/* ==========================================================================
   Top Navigation Bar
   ========================================================================== */

.top-nav-bar {
    height: var(--header-height);
    padding: 0 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(7, 8, 11, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 30;
    flex-shrink: 0;
}

.view-header-title h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

/* Search Command Bar */
.search-command-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: 0 0.85rem;
    height: 36px;
    width: 260px;
    transition: all 0.18s ease;
}

.search-command-bar:focus-within {
    width: 320px;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
    background: var(--bg-surface-hover);
}

.search-icon {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.search-command-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    width: 100%;
}

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

.search-shortcut {
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    line-height: 1;
    pointer-events: none;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    min-width: 320px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 380px;
    overflow-y: auto;
    z-index: 50;
    padding: 0.5rem;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.12s ease;
}

.search-item:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

/* Segmented Control */
.segmented-control {
    display: inline-flex;
    align-items: center;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 2px;
}

.segment-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.15s ease;
}

.segment-btn:hover {
    color: var(--text-secondary);
}

.segment-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm), var(--specular-line);
}

/* Toggle Pills */
.toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    user-select: none;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.toggle-pill:hover {
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.toggle-pill input {
    display: none;
}

.toggle-track {
    width: 26px;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    position: relative;
    transition: background 0.18s ease;
}

.toggle-thumb {
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.18s ease;
}

.toggle-pill input:checked + .toggle-track {
    background: var(--accent-primary);
}

.toggle-pill input:checked + .toggle-track .toggle-thumb {
    transform: translateX(12px);
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Select Pill */
.select-wrapper {
    position: relative;
}

.select-pill {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    padding: 0.45rem 1.75rem 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    transition: all 0.15s ease;
}

.select-pill:hover {
    border-color: var(--border-light);
    color: var(--text-primary);
}

/* ==========================================================================
   Buttons System
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 0 rgba(255, 255, 255, 0.25);
    border-color: rgba(99, 102, 241, 0.8);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #7073ff 0%, #5850ec 100%);
    box-shadow: 0 4px 14px var(--accent-primary-glow), inset 0 1px 0 0 rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm), var(--specular-line);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-card-hover);
    transform: translateY(-1px);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

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

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.45);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* Icon Buttons */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

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

.btn-icon.is-active {
    color: var(--success);
}

/* ==========================================================================
   Content Area & Breadcrumbs
   ========================================================================== */

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1.75rem 5rem 1.75rem;
}

.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.breadcrumb-crumb {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.breadcrumb-crumb:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.breadcrumb-crumb.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-light);
    font-weight: 600;
}

.breadcrumb-chevron {
    color: var(--text-disabled);
    display: flex;
    align-items: center;
}

.breadcrumb-up-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.breadcrumb-up-link:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-card-hover);
}

.breadcrumb-search-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ==========================================================================
   Elegant Sectioned Grid & Preview Viewports
   ========================================================================== */

.view-stage-grid {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.grid-section-header {
    margin-bottom: 0.85rem;
    padding: 0 0.25rem;
}

.grid-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.grid-section-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-disabled);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

/* ── 1. Folder Tiles Grid ── */
.folder-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.75rem;
}

/* Custom Checkbox (selection) */
.custom-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-visual {
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--text-disabled);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.15s ease;
}

.checkbox-visual svg {
    width: 12px;
    height: 12px;
}

.custom-checkbox:hover .checkbox-visual {
    border-color: var(--text-secondary);
}

.custom-checkbox input:checked + .checkbox-visual {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
}

.custom-checkbox input:focus-visible + .checkbox-visual {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.folder-card-tile {
    height: 56px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm), var(--specular-line);
    cursor: pointer;
    user-select: none;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.folder-card-tile:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-card-hover);
    transform: translateY(-1.5px);
    box-shadow: var(--shadow-md), var(--specular-line);
}

.folder-card-tile.selected {
    background: rgba(99, 102, 241, 0.09);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary), var(--shadow-sm);
}

.folder-tile-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.folder-tile-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.06));
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.folder-tile-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.folder-tile-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-tile-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.tile-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.folder-card-tile:hover .tile-actions {
    opacity: 1;
}

/* ── 2. File Cards (Preview Canvas Stage) ── */
.file-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 1rem;
}

.file-card-stage {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm), var(--specular-line);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.file-card-stage:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.45), var(--specular-line);
}

.file-card-stage.selected {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1.5px var(--accent-primary), 0 8px 24px -4px rgba(99, 102, 241, 0.25);
}

/* Preview Canvas */
.file-card-preview {
    height: 115px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background 0.18s ease;
}

.file-card-stage:hover .file-card-preview {
    background: rgba(0, 0, 0, 0.15);
}

.preview-overlay-top {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    right: 0.65rem;
    z-index: 5;
}

.preview-glyph-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-glyph {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-glyph svg {
    width: 24px;
    height: 24px;
}

.file-card-stage:hover .preview-glyph {
    transform: scale(1.08);
}

.preview-quick-actions {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(18, 21, 32, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    padding: 2px 4px;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.15s ease;
    z-index: 6;
}

.file-card-stage:hover .preview-quick-actions {
    opacity: 1;
    transform: translateY(0);
}

.preview-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

/* Info Panel */
.file-card-info-panel {
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.file-card-title-row {
    gap: 0.5rem;
}

.file-card-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.file-ext-chip {
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.file-card-meta-row {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.meta-size-date {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-inline-actions {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.file-card-stage:hover .card-inline-actions {
    opacity: 1;
}

.file-card-url-badge {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    background: rgba(6, 182, 212, 0.06);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 0.15rem;
}

/* ── 3. Table View (List Mode) ── */
.view-stage-list {
    width: 100%;
}

.table-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm), var(--specular-line);
    overflow: hidden;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.file-table th {
    padding: 0.85rem 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-disabled);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.015);
}

.file-row {
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.12s ease;
    cursor: pointer;
    height: 48px;
}

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

.file-row:hover {
    background: rgba(255, 255, 255, 0.035);
}

.file-row.selected {
    background: rgba(99, 102, 241, 0.08);
}

.file-table td {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.col-checkbox {
    width: 44px;
    padding-right: 0 !important;
}

.col-name {
    min-width: 240px;
}

.col-ext {
    width: 80px;
}

.col-size {
    width: 110px;
}

.col-date {
    width: 140px;
    color: var(--text-muted) !important;
}

.col-status {
    width: 70px;
}

.col-actions {
    width: 140px;
    text-align: right;
}

.row-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.row-icon-pill {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.row-icon-pill svg {
    width: 16px;
    height: 16px;
}

/* File Type Badges & Icon Pills */
.file-badge-pdf { background: rgba(239, 68, 68, 0.15); color: #f87171; border-color: rgba(239, 68, 68, 0.3); }
.file-badge-pdf svg { stroke: #f87171; }

.file-badge-doc { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.file-badge-doc svg { stroke: #60a5fa; }

.file-badge-sheet { background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.3); }
.file-badge-sheet svg { stroke: #34d399; }

.file-badge-archive { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border-color: rgba(245, 158, 11, 0.3); }
.file-badge-archive svg { stroke: #fbbf24; }

.file-badge-image { background: rgba(236, 72, 153, 0.15); color: #f472b6; border-color: rgba(236, 72, 153, 0.3); }
.file-badge-image svg { stroke: #f472b6; }

.file-badge-video { background: rgba(168, 85, 247, 0.15); color: #c084fc; border-color: rgba(168, 85, 247, 0.3); }
.file-badge-video svg { stroke: #c084fc; }

.file-badge-audio { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border-color: rgba(6, 182, 212, 0.3); }
.file-badge-audio svg { stroke: #22d3ee; }

.file-badge-code { background: rgba(99, 102, 241, 0.15); color: #818cf8; border-color: rgba(99, 102, 241, 0.3); }
.file-badge-code svg { stroke: #818cf8; }

.file-badge-exec { background: rgba(244, 63, 94, 0.15); color: #fb7185; border-color: rgba(244, 63, 94, 0.3); }
.file-badge-exec svg { stroke: #fb7185; }

.file-badge-default { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.3); }
.file-badge-default svg { stroke: #cbd5e1; }

.row-name-text-stack {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.row-item-name {
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.lock-indicator-inline {
    color: #f59e0b;
    display: inline-flex;
    align-items: center;
}

.row-custom-slug {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--accent-secondary);
}

.type-chip {
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 1px 6px;
    border-radius: 4px;
}

.type-chip-folder {
    font-size: 0.68rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 1px 6px;
    border-radius: 4px;
}

.row-hover-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.file-row:hover .row-hover-actions {
    opacity: 1;
}

.status-toggle-dot {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Floating Selection Dock
   ========================================================================== */

#selection-bar-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    pointer-events: auto;
}

.selection-floating-dock {
    background: rgba(18, 21, 32, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.2), var(--specular-line);
    border-radius: var(--radius-full);
    padding: 0.5rem 0.85rem;
    gap: 1.5rem;
    animation: dockAppear 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dockAppear {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.selection-badge {
    font-size: 0.84rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.5rem;
}

.selection-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.selection-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Empty States
   ========================================================================== */

.empty-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
}

.empty-state-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 360px;
}

.empty-icon-ring {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.empty-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.empty-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.upload-area {
    cursor: pointer;
    border: 1.5px dashed var(--border-light);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    transition: all 0.18s ease;
    width: 100%;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.04);
}

/* ==========================================================================
   Modals & Dialogs
   ========================================================================== */

#modal-container {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1.5rem;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-dialog-wrapper {
    width: 100%;
    max-width: 500px;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--specular-line);
    padding: 1.75rem;
    position: relative;
    animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-subtitle {
    font-size: 0.86rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.modal-close-trigger {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.modal-close-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* Form Fields */
.input-field-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.55rem 0.85rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.15s ease;
}

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
    background: var(--bg-surface-hover);
}

/* ==========================================================================
   Toasts System
   ========================================================================== */

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 110;
    pointer-events: none;
}

.toast-pill {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.1rem;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md), var(--specular-line);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    animation: toastSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast-pill.fade-out {
    opacity: 0;
    transform: translateY(8px);
}

.toast-pill.success {
    border-color: var(--success-border);
}

.toast-pill.success .toast-icon {
    color: var(--success);
}

.toast-pill.error {
    border-color: var(--error-border);
}

.toast-pill.error .toast-icon {
    color: var(--error);
}

/* ==========================================================================
   Upload Tray
   ========================================================================== */

.upload-tray {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), var(--specular-line);
    padding: 1rem;
    z-index: 80;
}

.upload-tray-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.upload-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
}

.upload-item-name {
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.upload-item-status {
    color: var(--accent-secondary);
    font-weight: 600;
}

.upload-progress-bg {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-full);
    transition: width 0.15s ease;
}

/* ==========================================================================
   Authentication & Setup View
   ========================================================================== */

.auth-viewport {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1.5rem;
}

.auth-ambient-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.04), var(--specular-line);
    padding: 2.25rem 2rem;
    position: relative;
    z-index: 10;
}

.auth-brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-badge {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45), var(--specular-line);
    margin-bottom: 1.25rem;
}

.auth-title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.auth-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.auth-submit-btn {
    width: 100%;
    padding: 0.7rem 1.25rem;
    font-size: 0.92rem;
    margin-top: 0.5rem;
}

.auth-submit-btn .btn-arrow {
    display: flex;
    align-items: center;
    transition: transform 0.15s ease;
}

.auth-submit-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.auth-footer-note {
    margin-top: 1.75rem;
    display: flex;
    justify-content: center;
}

.security-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Shares & Tools Specific
   ========================================================================== */

.copy-url-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.65rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.copy-url-pill:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
}

.code-output-area {
    width: 100%;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    outline: none;
    resize: vertical;
}

.pro-card {
    border-radius: var(--radius-lg);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.danger-zone-card {
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.02);
}

.danger-action-row {
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: var(--radius-md);
}

.action-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.action-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* ══════════════════════════════════════════════════════════════════
   Drag & Drop (Folders, Files, Breadcrumbs)
   ══════════════════════════════════════════════════════════════════ */
.file-card.dragging {
    opacity: 0.35;
    transform: scale(0.97);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.file-card.folder-card {
    position: relative;
}

.file-card.folder-card.drop-target-active {
    border-color: var(--accent-primary) !important;
    background: rgba(99, 102, 241, 0.15) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4), 0 8px 24px rgba(99, 102, 241, 0.25) !important;
    transform: translateY(-2px);
}

.folder-drop-overlay {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    background: rgba(15, 17, 23, 0.82);
    backdrop-filter: blur(4px);
    border-radius: inherit;
    pointer-events: none;
    z-index: 20;
}

.file-card.folder-card.drop-target-active .folder-drop-overlay {
    display: flex;
}

.folder-drop-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 5px 12px;
    background: var(--accent-primary);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dv-dragging .file-card:not(.folder-card):not(.dragging) {
    opacity: 0.65;
}

.breadcrumb-item.drop-target-active {
    background: rgba(99, 102, 241, 0.3) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.6) !important;
    border-radius: 6px;
}

.dv-drag-ghost {
    position: absolute;
    top: -1000px;
    left: -1000px;
    padding: 6px 14px;
    background: var(--accent-primary);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    white-space: nowrap;
    z-index: 9999;
}

/* ══════════════════════════════════════════════════════════════════
   Smart Comments & Notes
   ══════════════════════════════════════════════════════════════════ */
.file-card.has-comment {
    border-color: rgba(99, 102, 241, 0.35);
}

.file-card-comment-line {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding: 3px 7px;
    background: rgba(99, 102, 241, 0.08);
    border-left: 2px solid var(--accent-primary);
    border-radius: 3px;
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--text-secondary);
    max-width: 100%;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.15s ease;
}

/* List view: comment under the file name */
.file-card-comment-line.row-comment-line {
    margin-top: 0.3rem;
    max-width: 560px;
}

.file-card-comment-line:hover {
    background: rgba(99, 102, 241, 0.16);
    color: var(--text-primary);
}

.comment-icon-inline {
    display: inline-flex;
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 1px;
}

.comment-icon-inline svg {
    width: 12px;
    height: 12px;
}

/* Up to two lines of the comment, full text in the tooltip */
.comment-text-inline {
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow-wrap: anywhere;
}

.btn-icon.comment-btn.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.3);
}

.comment-modal {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.comment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.comment-modal-title {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    min-width: 0;
}

.comment-modal-file {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 360px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.15rem;
}

.comment-modal-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    font-weight: 600;
    white-space: nowrap;
}

.comment-counter {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.comment-counter.near-limit {
    color: hsl(var(--error));
}

.comment-suggestions {
    margin-top: 0.75rem;
}

.comment-suggestions-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}

.comment-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.comment-chip {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.comment-chip:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.comment-modal-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ══════════════════════════════════════════════════════════════════
   Temp Files Drag & Drop Overlay
   ══════════════════════════════════════════════════════════════════ */
#temp-drop-target {
    position: relative;
    min-height: 350px;
}

.temp-drop-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 40;
    align-items: center;
    justify-content: center;
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-xl);
    pointer-events: none;
}

.temp-drop-overlay.active {
    display: flex;
}

.temp-drop-overlay-inner {
    text-align: center;
    padding: 2.5rem 3.5rem;
    border: 2px dashed var(--accent-primary);
    border-radius: var(--radius-xl);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.25);
    animation: temp-drop-pop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.drop-icon-pulse {
    color: var(--accent-primary);
    transform: scale(1.6);
    margin-bottom: 0.75rem;
    display: inline-block;
}

@keyframes temp-drop-pop {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}


/* ── Status dot (list view status column, temp file cards) ── */
.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-disabled);
    display: inline-block;
}

.status-indicator.active {
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.status-indicator.inactive {
    background: var(--text-disabled);
}

.status-indicator.danger {
    background: var(--error);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

/* ==========================================================================
   Temp Files Pro — Ephemeral Cloud Vault Styles
   ========================================================================== */

.temp-content-wrapper {
    padding: 1.5rem 2rem;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    position: relative;
}

/* Empty Hero Section */
.temp-empty-hero {
    max-width: 820px;
    margin: 2rem auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.25s ease;
}

.temp-empty-pulse-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.25);
}

.temp-pulse-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid var(--accent-primary);
    opacity: 0.4;
    animation: pulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulseRing {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.18); opacity: 0.15; }
    100% { transform: scale(1.3); opacity: 0; }
}

.temp-empty-hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.temp-empty-hero-sub {
    font-size: 0.92rem;
    color: var(--text-muted);
    max-width: 580px;
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.temp-drop-zone-card {
    width: 100%;
    border: 2px dashed rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.03);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    margin-bottom: 2rem;
}

.temp-drop-zone-card:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.07);
    box-shadow: 0 0 24px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.temp-drop-zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.temp-drop-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.temp-drop-text {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.temp-drop-text strong {
    color: var(--accent-secondary);
}

.temp-drop-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Feature cards row */
.temp-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    text-align: left;
}

.temp-feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: all 0.18s ease;
}

.temp-feature-card:hover {
    border-color: var(--border-card-hover);
    background: var(--bg-surface-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.temp-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.temp-feature-icon.burn {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.temp-feature-icon.time {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.temp-feature-icon.lock {
    background: rgba(99, 102, 241, 0.14);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.temp-feature-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.temp-feature-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* ── Temp Files Active List ── */
.temp-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.15rem;
}

.temp-file-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm), var(--specular-line);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.temp-file-card:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.temp-file-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.temp-policy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
}

.temp-policy-badge.burn {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.28);
}

.temp-policy-badge.expiring {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.temp-policy-badge.encrypted {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.28);
}

.temp-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.temp-pulse-dot.red {
    animation: syncPulse 1s infinite alternate;
}

.temp-file-main-body {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
    flex: 1;
}

.temp-file-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.temp-file-details {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.temp-file-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.temp-file-meta-line {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.temp-url-slug-pill {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: 0.65rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.temp-url-slug-pill:hover {
    border-color: var(--accent-secondary);
    background: rgba(6, 182, 212, 0.08);
}

.temp-actions-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.75rem;
}

/* ── Temp Lifetime Picker Modal ── */
.temp-options-stack {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.temp-opt-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.95rem 1.15rem !important;
    background: #141724 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--radius-lg) !important;
    text-align: left;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer;
    text-decoration: none;
}

.temp-opt-btn:hover {
    background: #1c2134 !important;
    border-color: rgba(99, 102, 241, 0.45) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.temp-opt-icon-bubble {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.temp-opt-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.temp-opt-desc {
    font-size: 0.81rem;
    color: #cbd5e1;
    margin-top: 0.2rem;
    line-height: 1.4;
    font-weight: 400;
}

.temp-opt-chevron {
    color: #94a3b8;
    display: flex;
    align-items: center;
    transition: transform 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.temp-opt-btn:hover .temp-opt-chevron {
    color: var(--accent-primary);
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .temp-features-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Pastebin Pro — Obsidian & Electric Iris Workspace
   ========================================================================== */

.main-content.paste-main-layout,
.paste-main-layout {
    flex-direction: row !important;
    display: flex !important;
    height: 100vh;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 0 !important;
    background: var(--bg-base);
}

.paste-sidebar {
    width: 320px;
    min-width: 280px;
    max-width: 380px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-light);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    z-index: 10;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.paste-sidebar-header {
    padding: 1.1rem 1.15rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.paste-heading-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.paste-sidebar-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.paste-count-pill {
    background: rgba(99, 102, 241, 0.14);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.28);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.12rem 0.5rem;
    border-radius: var(--radius-full);
}

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

.paste-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.paste-search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.paste-search-input {
    width: 100%;
    padding: 0.45rem 2rem 0.45rem 2.25rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    color: var(--text-primary);
    outline: none;
    transition: all 0.18s ease;
}

.paste-search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary-glow);
    background: var(--bg-surface);
}

.paste-search-clear {
    position: absolute;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease;
}

.paste-search-clear:hover {
    color: var(--text-primary);
}

.paste-batch-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-md);
    animation: fadeIn 0.15s ease;
}

.paste-batch-select-all {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.paste-batch-select-all input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.paste-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.paste-list-container::-webkit-scrollbar {
    width: 5px;
}

.paste-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.paste-card {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    background: var(--bg-subtle);
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    user-select: none;
}

.paste-card:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-card-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.paste-card.active {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.18), inset 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.paste-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.paste-card-title-group {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1;
    min-width: 0;
}

.paste-card-checkbox {
    accent-color: var(--accent-primary);
    cursor: pointer;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.paste-card-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.paste-card.active .paste-card-title {
    color: #fff;
}

.paste-card-actions {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.paste-card:hover .paste-card-actions {
    opacity: 1;
}

.paste-card-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.paste-card-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.paste-card-action-btn.danger:hover {
    background: var(--error-bg);
    color: var(--error);
}

.paste-card-preview {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
    opacity: 0.82;
}

.paste-card.active .paste-card-preview {
    color: var(--text-secondary);
}

.paste-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.45rem;
}

.paste-card-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-family: var(--font-mono);
}

/* ── Workspace / Editor Area ── */
.paste-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-base);
    min-width: 0;
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.paste-workspace-header {
    height: var(--header-height);
    border-bottom: 1px solid var(--border-light);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--bg-surface);
    backdrop-filter: blur(8px);
    z-index: 5;
    flex-shrink: 0;
}

.paste-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.paste-title-input {
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0.35rem 0.65rem;
    width: 100%;
    max-width: 520px;
    outline: none;
    transition: all 0.18s ease;
    letter-spacing: -0.01em;
}

.paste-title-input:hover:not(:disabled) {
    border-color: var(--border-light);
    background: var(--bg-subtle);
}

.paste-title-input:focus:not(:disabled) {
    border-color: var(--accent-primary);
    background: var(--bg-subtle);
    box-shadow: 0 0 0 2px var(--accent-primary-glow);
}

.paste-title-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.paste-sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.22rem 0.65rem;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
}

.paste-sync-badge.saved {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.paste-sync-badge.saving {
    background: rgba(99, 102, 241, 0.14);
    color: var(--accent-primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.paste-sync-badge.unsaved {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.paste-sync-badge.error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid var(--error-border);
}

.paste-sync-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.paste-sync-badge.saving .paste-sync-dot {
    animation: syncPulse 1s infinite alternate ease-in-out;
}

@keyframes syncPulse {
    from { opacity: 0.3; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.2); }
}

.paste-actions-toolbar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.paste-editor-wrapper {
    flex: 1;
    display: flex;
    position: relative;
    overflow: hidden;
    background: #08090d;
}

.paste-gutter {
    width: 56px;
    background: #0a0b10;
    border-right: 1px solid var(--border-subtle);
    padding: 1.25rem 0.65rem 1.25rem 0.25rem;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    color: var(--text-disabled);
    user-select: none;
    line-height: 1.6;
    overflow: hidden;
    flex-shrink: 0;
}

.paste-gutter-number {
    display: block;
    height: 1.6em;
}

.paste-textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    white-space: pre;
    tab-size: 4;
    -moz-tab-size: 4;
    word-wrap: normal;
    overflow-x: auto;
    caret-color: var(--accent-secondary);
}

.paste-textarea:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.paste-textarea::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.paste-textarea::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.paste-textarea::-webkit-scrollbar-track {
    background: transparent;
}

.paste-statusbar {
    height: 34px;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    flex-shrink: 0;
    user-select: none;
}

.paste-status-stats {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.paste-status-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.paste-status-shortcuts {
    color: var(--text-disabled);
    font-size: 0.72rem;
}

/* Empty workspace state */
.paste-empty-workspace {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-base);
}

.paste-empty-card {
    max-width: 440px;
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), var(--specular-line);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.paste-empty-icon-ring {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.28);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.paste-empty-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.paste-empty-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Delete confirmation modal card */
.paste-delete-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.paste-delete-modal-target {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.86rem;
    color: var(--text-primary);
    margin: 0.75rem 0;
    word-break: break-all;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .paste-sidebar {
        width: 260px;
        min-width: 240px;
    }
    .paste-workspace-header {
        padding: 0 1rem;
    }
}

/* ==========================================================================
   CLI Download Modal Styles (curl / iwr / wget)
   ========================================================================== */

.cli-modal-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.28);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cli-file-info-bar {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
}

.cli-info-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cli-info-size {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.cli-url-preview {
    font-size: 0.75rem;
    color: var(--text-muted);
    gap: 0.5rem;
}

.cli-url-text {
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.9;
}

.cli-copy-url-btn {
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
    flex-shrink: 0;
}

.form-input-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
}

.cli-command-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.65rem;
    transition: all 0.15s ease;
}

.cli-command-card:hover {
    border-color: var(--border-card-hover);
    background: var(--bg-surface-hover);
}

.cli-command-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.cli-command-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.cli-command-badge {
    font-size: 0.68rem;
    font-weight: 500;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.cli-code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    background: #08090d;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.65rem;
}

.cli-code-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #38bdf8;
    white-space: nowrap;
    overflow-x: auto;
    flex: 1;
    user-select: all;
    line-height: 1.4;
}

.cli-code-text::-webkit-scrollbar {
    height: 3px;
}

.cli-code-text::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.cli-copy-cmd-btn {
    flex-shrink: 0;
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
}

.btn-success {
    background: var(--success-bg) !important;
    color: var(--success) !important;
    border-color: var(--success-border) !important;
}

/* Clear-search control reuses the shortcut badge look but must be clickable */
.search-shortcut.search-clear-btn {
    pointer-events: auto;
    cursor: pointer;
    border: none;
    align-items: center;
    justify-content: center;
}

.search-shortcut.search-clear-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.14);
}

/* Password field with a show/hide button, and a muted hint line (dialogs) */
.password-input-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.password-input-row .form-input {
    flex: 1;
    font-family: var(--font-mono);
}

.modal-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

/* Share page for encrypted files */
.decrypt-page-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.decrypt-card {
    width: min(420px, 92vw);
    padding: 2rem;
    text-align: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm), var(--specular-line);
    color: var(--text-primary);
}

.decrypt-card h2 {
    margin: 0 0 0.5rem;
}

.decrypt-icon {
    font-size: 2.6rem;
    margin-bottom: 0.75rem;
}

.decrypt-name {
    margin: 0 0 1rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.decrypt-sub {
    margin: 0 0 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.decrypt-card .form-input {
    width: 100%;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
}

.decrypt-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
}

.decrypt-status {
    margin-top: 1rem;
    min-height: 1.2em;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.decrypt-status[data-kind="error"] { color: var(--error); }
.decrypt-status[data-kind="ok"] { color: var(--success); }

.upload-retry-btn { margin-left: 0.5rem; padding: 2px 8px; }

/* ── Active sessions (Settings) ─────────────────────────────── */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.session-row.is-current {
    border-color: rgba(16, 185, 129, 0.35);
}

.session-info {
    min-width: 0;
}

.session-device {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.session-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

.session-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    color: var(--success);
    background: rgba(16, 185, 129, 0.12);
}

.sessions-empty {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================================================
   IIS Decoy Mode (Camouflage)
   ========================================================================== */
body.iis-decoy-mode {
    background-color: #0072C6 !important;
    background-image: none !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: auto !important;
}

body.iis-decoy-mode #app {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    background: transparent !important;
    overflow: visible !important;
}

body.iis-decoy-mode #container {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding: 0;
}

body.iis-decoy-mode a img {
    border: none;
    display: inline-block;
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

/* ==========================================================================
   Self-Contained HTML Packages ("HTMLs" View & Modals)
   ========================================================================== */

.modal-dialog-wrapper:has(.html-modal-wide) {
    max-width: 860px;
}

.modal-dialog-wrapper:has(.html-preview-wide) {
    max-width: 980px;
}

.modal-card:has(.html-modal-wide),
.modal-card:has(.html-preview-wide) {
    max-height: 90vh;
    overflow-y: auto;
}

.pkg-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.pkg-preview-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1rem;
    align-items: start;
}

.pkg-pane-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.pkg-preview-iframe {
    width: 100%;
    height: 430px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #07080b;
}

.pkg-test-pane {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.9rem;
}

.pkg-test-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pkg-test-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.78rem;
}

.pkg-test-row.pass {
    border-color: var(--success-border);
    background: var(--success-bg);
}

.pkg-test-row.fail {
    border-color: var(--error-border);
    background: var(--error-bg);
}

.pkg-test-mark {
    font-weight: 700;
    line-height: 1.2;
}

.pkg-test-row.pass .pkg-test-mark { color: var(--success); }
.pkg-test-row.fail .pkg-test-mark { color: var(--error); }

.pkg-test-label {
    font-weight: 600;
    color: var(--text-primary);
}

.pkg-test-detail {
    color: var(--text-muted);
    font-size: 0.73rem;
    word-break: break-word;
}

.temp-policy-badge.html-std {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.28);
}

.temp-policy-badge.html-svg {
    background: rgba(6, 182, 212, 0.12);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.28);
}

.html-date-tag {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.html-sha-line {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-disabled);
    margin-top: 0.2rem;
}

.html-card-primary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.html-card-primary-actions .btn {
    justify-content: center;
}

@media (max-width: 820px) {
    .pkg-form-grid,
    .pkg-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* HTMLs dashboard on phones */
.htmls-menu-trigger,.htmls-menu-backdrop{display:none}
@media(max-width:820px){
  .htmls-layout{width:100%;height:100dvh;overflow:hidden}
  .htmls-layout .sidebar-v2{position:fixed;inset:0 auto 0 0;width:min(280px,84vw);height:100dvh;transform:translateX(-105%);transition:transform .2s ease;z-index:80;box-shadow:12px 0 40px rgba(0,0,0,.4)}
  .htmls-layout .sidebar-v2.collapsed{width:min(280px,84vw)}
  .htmls-layout .sidebar-v2.collapsed .brand-text-block,.htmls-layout .sidebar-v2.collapsed .nav-group-title,.htmls-layout .sidebar-v2.collapsed .nav-link-label,.htmls-layout .sidebar-v2.collapsed .sidebar-storage-card{display:block}
  .htmls-layout.menu-open .sidebar-v2{transform:translateX(0)}
  .htmls-menu-backdrop{position:fixed;inset:0;border:0;background:rgba(0,0,0,.65);z-index:79}
  .htmls-layout.menu-open .htmls-menu-backdrop{display:block}
  .htmls-menu-trigger{display:inline-flex;align-items:center;justify-content:center;flex:none;width:42px;height:42px;border:1px solid var(--border-light);border-radius:12px;background:var(--bg-surface);color:var(--text-primary)}
  .htmls-menu-trigger svg{width:20px;height:20px}
  .htmls-layout .main-content{width:100%;height:100dvh;min-width:0}
  .htmls-layout .top-nav-bar{height:auto;min-height:0;padding:14px 16px;display:grid;grid-template-columns:42px minmax(0,1fr);align-items:start;gap:12px}
  .htmls-layout .top-nav-left{min-width:0;display:contents}
  .htmls-layout .view-header-title{min-width:0;grid-column:2}
  .htmls-layout .view-header-title>div{flex-wrap:wrap}
  .htmls-layout .view-header-subtitle{display:block;max-width:100%;font-size:12px;line-height:1.45;white-space:normal}
  .htmls-layout .search-command-bar{grid-column:1/-1;width:100%;margin:0!important}
  .htmls-layout .search-command-bar:focus-within{width:100%}
  .htmls-layout .top-nav-right{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .htmls-layout #htmls-filter-segments{grid-column:1/-1;display:flex;width:100%}
  .htmls-layout #htmls-filter-segments .segment-btn{flex:1;justify-content:center;min-width:0}
  .htmls-layout #htmls-view-segments{display:none}
  .htmls-layout #use-existing-html-btn,.htmls-layout #create-html-btn{min-width:0;width:100%;justify-content:center;padding:10px 6px;font-size:12px;white-space:normal}
  .htmls-layout #use-existing-html-btn svg,.htmls-layout #create-html-btn svg{flex:none}
  .htmls-layout #htmls-drop-target{min-height:0;flex:1;overflow:hidden}
  .htmls-layout .temp-content-wrapper{height:100%;padding:16px;overflow-x:hidden;overflow-y:auto}
  .htmls-layout .temp-empty-hero{width:100%;max-width:420px;margin:24px auto;padding:0 8px}
  .htmls-layout .temp-empty-hero-title{font-size:1.3rem;line-height:1.3}
  .htmls-layout .temp-empty-hero-sub{font-size:.85rem;line-height:1.5;max-width:34ch;overflow-wrap:anywhere}
  .htmls-layout .temp-empty-hero .flex{width:100%;flex-direction:column;gap:10px}
  .htmls-layout .temp-empty-hero .btn{width:100%;justify-content:center;white-space:normal}
  .htmls-layout .temp-grid-layout{display:grid;grid-template-columns:1fr;gap:14px;min-width:0}
  .htmls-layout .html-pkg-card{min-width:0}
  .htmls-layout .html-card-primary-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .htmls-layout .html-card-primary-actions .btn{min-width:0}
  .modal-dialog-wrapper:has(.html-modal-wide),.modal-dialog-wrapper:has(.html-preview-wide){width:calc(100vw - 20px);max-width:calc(100vw - 20px)}
  .html-modal-wide,.html-preview-wide{min-width:0}
  .pkg-form-grid,.pkg-preview-grid{grid-template-columns:minmax(0,1fr)}
  .pkg-preview-iframe{height:360px}
}
@media(max-width:380px){
  .htmls-layout .top-nav-bar{padding:12px}
  .htmls-layout .temp-content-wrapper{padding:12px}
  .htmls-layout #use-existing-html-btn,.htmls-layout #create-html-btn{font-size:11px}
}

/* Shared phone layout for the vault, temporary files, tools, settings and paste editor */
.mobile-nav-trigger,.mobile-nav-backdrop{display:none}
@media(max-width:820px){
  #app,.app-layout,.main-content{width:100%;height:100dvh;min-width:0}
  .app-layout:not(.htmls-layout)>.sidebar-v2{position:fixed;top:0;bottom:0;left:0;width:min(280px,85vw);height:100dvh;z-index:80;transform:translateX(-105%);transition:transform .2s ease;box-shadow:12px 0 40px rgba(0,0,0,.5)}
  .app-layout:not(.htmls-layout)>.sidebar-v2.collapsed{width:min(280px,85vw)}
  .app-layout:not(.htmls-layout)>.sidebar-v2.collapsed .brand-text-block,
  .app-layout:not(.htmls-layout)>.sidebar-v2.collapsed .nav-group-title,
  .app-layout:not(.htmls-layout)>.sidebar-v2.collapsed .nav-link-label,
  .app-layout:not(.htmls-layout)>.sidebar-v2.collapsed .sidebar-storage-card{display:block}
  .app-layout:not(.htmls-layout)>.sidebar-v2.collapsed .nav-link{justify-content:flex-start}
  .app-layout.mobile-nav-open>.sidebar-v2{transform:translateX(0)}
  .mobile-nav-backdrop{position:fixed;inset:0;z-index:79;border:0;background:rgba(0,0,0,.65)}
  .mobile-nav-open .mobile-nav-backdrop{display:block}
  .mobile-nav-trigger{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;border:1px solid var(--border-light);border-radius:12px;background:var(--bg-surface);color:var(--text-primary);z-index:1}
  .mobile-nav-trigger svg{width:20px;height:20px}
  .app-layout:not(.htmls-layout) .top-nav-bar{height:auto;min-height:66px;padding:12px;gap:10px;flex-wrap:wrap;justify-content:flex-start;align-content:center}
  .app-layout:not(.htmls-layout) .top-nav-left{min-width:0;flex:1;flex-wrap:wrap;gap:8px}
  .app-layout:not(.htmls-layout) .top-nav-right{min-width:0;width:100%;flex-wrap:wrap;gap:8px}
  .app-layout:not(.htmls-layout) .view-header-title{min-width:0}
  .app-layout:not(.htmls-layout) .view-header-subtitle{display:block;font-size:12px;line-height:1.4;white-space:normal}
  .app-layout:not(.htmls-layout) .search-command-bar{width:100%;margin:0!important}
  .app-layout:not(.htmls-layout) .search-command-bar:focus-within{width:100%}
  .app-layout:not(.htmls-layout) .segmented-control{max-width:100%;flex-wrap:wrap}
  .app-layout:not(.htmls-layout) .content-area{min-width:0;padding:16px;overflow-x:hidden}
  .app-layout:not(.htmls-layout) .temp-content-wrapper{height:100%;padding:16px;overflow-x:hidden}
  .temp-grid-layout,.files-grid,.file-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr))}
  .table-container{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .file-table{min-width:620px}
  .temp-empty-hero{width:100%;margin:24px auto}
  .temp-empty-hero-sub{max-width:34ch;overflow-wrap:anywhere}
  .temp-empty-hero .flex{flex-wrap:wrap;justify-content:center}
  .temp-empty-hero .btn{white-space:normal}
  .settings-grid,.glass-card,.pro-card{max-width:100%;min-width:0}
  .glass-card .flex.justify-between{flex-wrap:wrap}
  .modal-dialog-wrapper{max-width:calc(100vw - 20px);width:calc(100vw - 20px)}
  .modal-card{max-width:100%;max-height:calc(100dvh - 24px);overflow:auto}
  .modal-card input,.modal-card textarea,.modal-card select{max-width:100%;min-width:0;font-size:16px}
  .modal-footer-actions{flex-wrap:wrap;gap:8px}
  .modal-footer-actions .btn{white-space:normal}
  .auth-viewport{min-height:100dvh;padding:16px}
  .auth-card{max-width:min(100%,440px);width:100%}
  .main-content.paste-main-layout{height:100dvh!important;flex-direction:column!important;overflow:hidden}
  .paste-main-layout .paste-sidebar{width:100%!important;min-width:0;max-width:none;height:190px!important;flex:none;border-right:0;border-bottom:1px solid var(--border-light)}
  .paste-main-layout .paste-workspace{width:100%;height:auto!important;min-height:0;flex:1}
  .paste-workspace-header{height:auto;min-height:54px;padding:10px!important;flex-wrap:wrap;gap:8px}
  .paste-title-wrapper{min-width:0;flex:1}
  .paste-actions-toolbar{max-width:100%;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch}
  .paste-actions-toolbar .btn{flex:none}
  .paste-main-layout~.mobile-nav-trigger{position:fixed;top:12px;left:12px;z-index:65}
  .paste-main-layout .paste-sidebar-header{padding-left:64px}
}
@media(max-width:480px){
  .app-layout:not(.htmls-layout) .top-nav-right>.btn{min-height:42px}
  .app-layout:not(.htmls-layout) .top-nav-right>.segmented-control{width:100%}
  .app-layout:not(.htmls-layout) .top-nav-right>.segmented-control .segment-btn{flex:1;justify-content:center}
  .content-area{padding:12px}
  .temp-content-wrapper{padding:12px}
  .temp-empty-hero-title{font-size:1.3rem;line-height:1.3}
  .temp-empty-hero-sub{font-size:.85rem;line-height:1.5}
}

/* ==========================================================================
   Browser-Only HTML Tools Hub
   ========================================================================== */

.html-tool-card {
    cursor: pointer;
}

.temp-policy-badge.html-tool-badge {
    background: rgba(99, 102, 241, 0.14);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.html-tool-desc {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-dialog-wrapper:has(.tool-runner-wide) {
    max-width: min(1180px, 95vw);
}

.modal-card:has(.tool-runner-wide) {
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

.tool-runner-iframe {
    width: 100%;
    height: 75vh;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #0b0d14;
}

/* ==========================================================================
   Vault File Picker Explorer (inside Smuggle Creator Modal)
   ========================================================================== */

.vfp-explorer-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.vfp-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
}

.vfp-search-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
}

.vfp-search-icon {
    position: absolute;
    left: 0.65rem;
    color: var(--text-muted);
    display: inline-flex;
    pointer-events: none;
}

.vfp-search-input {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.38rem 1.85rem 0.38rem 2rem;
    color: var(--text-primary);
    font-size: 0.82rem;
    outline: none;
}

.vfp-search-input:focus {
    border-color: var(--border-focus);
}

.vfp-search-clear {
    position: absolute;
    right: 0.35rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    padding: 0.15rem;
}

.vfp-sort-select {
    padding: 0.32rem 0.6rem;
    font-size: 0.78rem;
}

.vfp-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.45rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.vfp-crumb-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
}

.vfp-crumb-btn:hover,
.vfp-crumb-btn.active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.vfp-crumb-sep {
    color: var(--text-disabled);
    display: inline-flex;
}

.vfp-stage {
    max-height: 260px;
    overflow-y: auto;
    padding: 0.65rem;
}

.vfp-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.vfp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.55rem;
}

.vfp-folder-tile,
.vfp-file-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.65rem;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.14s ease;
    min-width: 0;
}

.vfp-folder-tile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    grid-column: span 1;
}

.vfp-folder-icon {
    color: #fbbf24;
    display: inline-flex;
    flex-shrink: 0;
}

.vfp-folder-name {
    font-size: 0.82rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vfp-file-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.vfp-folder-tile:hover,
.vfp-file-card:hover {
    border-color: var(--border-card-hover);
    background: var(--bg-surface-hover);
}

.vfp-file-card.selected,
.vfp-row.selected {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.14);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.vfp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
}

.vfp-card-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vfp-card-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.vfp-lock-pill {
    color: var(--accent-primary);
    display: inline-flex;
}

.vfp-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vfp-card-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vfp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.vfp-row {
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
}

.vfp-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.vfp-row td {
    padding: 0.45rem 0.55rem;
}

.vfp-row-icon {
    width: 28px;
}

.vfp-row-name {
    font-weight: 600;
    color: var(--text-primary);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vfp-row-meta {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.vfp-row-size {
    color: var(--text-muted);
    text-align: right;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    white-space: nowrap;
}
