/* ========================================
   Sistema de Levantamentos - ArquiPro
   Design Corporativo Elegante
   ======================================== */

:root {
    /* Cores Corporativas - Azul Navy com Dourado */
    --primary: #1e3a5f;
    --primary-dark: #0f2744;
    --primary-light: #2d5a8a;
    --accent: #c9a227;
    --accent-light: #d4b84a;
    --accent-dark: #a68a1f;
    --secondary: #2d8a6e;
    --danger: #c53030;
    --warning: #d69e2e;
    --success: #2d8a6e;
    
    /* Backgrounds */
    --bg-main: #f5f7fa;
    --bg-card: #ffffff;
    --bg-header: #1e3a5f;
    --bg-input: #ffffff;
    --bg-secondary: #eef2f7;
    
    /* Textos */
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --text-on-primary: #ffffff;
    
    /* Bordas */
    --border-color: #e2e8f0;
    --border-light: #edf2f7;
    --border-dark: #cbd5e0;
    
    /* Sombras Elegantes */
    --shadow-sm: 0 1px 2px 0 rgba(30, 58, 95, 0.05);
    --shadow: 0 2px 4px 0 rgba(30, 58, 95, 0.08), 0 1px 2px -1px rgba(30, 58, 95, 0.06);
    --shadow-md: 0 4px 8px -2px rgba(30, 58, 95, 0.1), 0 2px 4px -2px rgba(30, 58, 95, 0.06);
    --shadow-lg: 0 12px 24px -4px rgba(30, 58, 95, 0.12), 0 4px 8px -4px rgba(30, 58, 95, 0.08);
    --shadow-xl: 0 24px 48px -8px rgba(30, 58, 95, 0.15), 0 8px 16px -6px rgba(30, 58, 95, 0.1);
    
    /* Bordas arredondadas */
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Gradientes Corporativos */
    --gradient-primary: linear-gradient(135deg, #1e3a5f 0%, #2d5a8a 100%);
    --gradient-accent: linear-gradient(135deg, #c9a227 0%, #d4b84a 100%);
    --gradient-dark: linear-gradient(135deg, #0f2744 0%, #1e3a5f 100%);
}

/* Dark Theme - Corporativo Escuro */
body.dark-theme {
    --bg-main: #0d1b2a;
    --bg-card: #1b2838;
    --bg-header: #0d1b2a;
    --bg-input: #1b2838;
    --bg-secondary: #243447;
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --border-color: #2d3f52;
    --border-light: #243447;
    --border-dark: #3d5166;
}

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

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Screens
   ======================================== */

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* ========================================
   Login Screen
   ======================================== */

#login-screen {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

#login-screen.active {
    display: flex;
}

#login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(45, 90, 138, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    text-align: center;
    padding: 40px 32px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.login-logo {
    margin-bottom: 32px;
}

.logo-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: var(--gradient-accent);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(201, 162, 39, 0.3);
}

.logo-icon svg {
    width: 36px;
    height: 36px;
    color: #1e3a5f;
}

.login-logo h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.login-logo p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 400;
}

.login-form {
    margin-top: 8px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(201, 162, 39, 0.1);
}

.btn-login {
    width: 52px;
    height: 52px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-accent);
    color: var(--primary-dark);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login svg {
    width: 22px;
    height: 22px;
}

.error-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 16px;
    min-height: 20px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========================================
   Main Screen
   ======================================== */

#main-screen {
    background: var(--bg-main);
    padding-top: 96px;
    padding-bottom: 100px;
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--bg-header);
    padding: 10px 16px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: none;
    gap: 12px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.header-left h1 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-on-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.selection-count {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    white-space: nowrap;
}

.selection-count.hidden {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Toolbar */
.toolbar {
    background: linear-gradient(135deg, #2d5a8a 0%, #1e3a5f 100%);
    padding: 8px 16px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(201, 162, 39, 0.3);
    box-shadow: 0 2px 4px rgba(15, 39, 68, 0.1);
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    z-index: 99;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.toolbar-btn:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.98);
}

.toolbar-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.toolbar-btn span {
    display: none;
}

@media (min-width: 480px) {
    .toolbar-btn span {
        display: inline;
    }
}

.toolbar-btn.btn-danger {
    background: rgba(197, 48, 48, 0.8);
    color: #fff;
}

.toolbar-btn.btn-danger:hover {
    background: rgba(197, 48, 48, 1);
}

.toolbar-btn.hidden {
    display: none;
}

body.dark-theme .toolbar {
    background: linear-gradient(135deg, #1b2838 0%, #0d1b2a 100%);
    border-bottom-color: rgba(201, 162, 39, 0.2);
}

.btn-icon {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-on-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-icon:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-icon svg.hidden {
    display: none;
}

.btn-icon.hidden {
    display: none;
}

.btn-icon.btn-danger {
    color: #ff6b6b;
}

.btn-icon.btn-danger:hover {
    background: rgba(197, 48, 48, 0.2);
}

.btn-icon.active {
    background: var(--accent);
    color: var(--primary-dark);
}

/* Connect Banner */
.connect-banner {
    background: var(--gradient-primary);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    animation: slideDown 0.4s ease;
    border-bottom: 2px solid var(--accent);
}

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

.connect-banner.hidden {
    display: none;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 0.9rem;
}

.google-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.btn-connect {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-connect:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
}

/* Breadcrumb */
.breadcrumb {
    padding: 10px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.breadcrumb::-webkit-scrollbar {
    display: none;
}

.breadcrumb-item {
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.breadcrumb-item:hover {
    color: var(--accent);
}

.breadcrumb-item:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 6px;
    color: var(--text-muted);
}

/* Content */
.content {
    padding: 12px;
    min-height: calc(100vh - 200px);
}

/* Folder List - Lista */
.folder-list {
    display: grid;
    gap: 8px;
}

/* Folder List - Grid */
.folder-list.grid-view {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 480px) {
    .folder-list.grid-view {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .folder-list.grid-view {
        grid-template-columns: repeat(4, 1fr);
    }
}

.folder-item, .file-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    animation: fadeInUp 0.3s ease;
    animation-fill-mode: both;
    width: 100%;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.folder-item:hover, .file-item:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.folder-item.selected, .file-item.selected {
    background: rgba(30, 58, 95, 0.06);
    border-color: var(--primary);
}

.item-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-dark);
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-card);
    transition: var(--transition);
}

.select-mode .item-checkbox {
    display: flex;
}

.item-checkbox.checked {
    background: var(--accent);
    border-color: var(--accent);
}

.item-checkbox svg {
    width: 14px;
    height: 14px;
    color: white;
    display: none;
}

.item-checkbox.checked svg {
    display: block;
}

/* Grid View Items */
.grid-view .folder-item,
.grid-view .file-item {
    flex-direction: column;
    padding: 16px 12px;
    text-align: center;
}

.grid-view .item-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
}

.grid-view .item-info {
    width: 100%;
}

.grid-view .item-name {
    font-size: 0.85rem;
    line-height: 1.3;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid-view .item-meta {
    font-size: 0.7rem;
    margin-top: 4px;
}

.grid-view .item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
}

.grid-view .folder-item,
.grid-view .file-item {
    position: relative;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.folder-item:nth-child(1) { animation-delay: 0.05s; }
.folder-item:nth-child(2) { animation-delay: 0.1s; }
.folder-item:nth-child(3) { animation-delay: 0.15s; }
.folder-item:nth-child(4) { animation-delay: 0.2s; }
.folder-item:nth-child(5) { animation-delay: 0.25s; }

.folder-item:hover, .file-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.folder-item:active, .file-item:active {
    transform: scale(0.98);
}

.item-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.item-thumbnail {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: var(--border-light);
}

.item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-thumbnail.video .video-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-thumbnail.video .video-badge svg {
    width: 8px;
    height: 8px;
    color: white;
}

.item-icon.folder {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #ffffff;
}

.item-icon.image {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    color: #ffffff;
}

.item-icon.video {
    background: linear-gradient(135deg, #f472b6 0%, #ec4899 100%);
    color: #ffffff;
}

.item-icon.file {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    color: #ffffff;
}

.item-icon svg {
    width: 22px;
    height: 22px;
}

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

.item-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.item-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
}

.item-actions {
    flex-shrink: 0;
    margin-left: auto;
}

.item-actions .btn-icon {
    width: 28px;
    height: 28px;
}

.item-actions .btn-icon svg {
    width: 16px;
    height: 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: 0.5;
}

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

.empty-state.hidden {
    display: none;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.loading.hidden {
    display: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: var(--text-muted);
}

/* FAB */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--gradient-accent);
    color: var(--primary-dark);
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.35);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 162, 39, 0.45);
}

.fab:active {
    transform: scale(0.95);
}

.fab svg {
    width: 26px;
    height: 26px;
}

.fab-secondary {
    bottom: 92px;
    background: var(--gradient-primary);
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.35);
}

.fab-secondary:hover {
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.45);
}

.fab-secondary svg {
    color: #ffffff;
}

/* Dropdown Menu */
.dropdown-menu {
    position: fixed;
    top: 70px;
    right: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    min-width: 200px;
    z-index: 200;
    overflow: hidden;
    animation: dropIn 0.2s ease;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.hidden {
    display: none;
}

.dropdown-menu button {
    width: 100%;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-menu button:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.dropdown-menu button svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

/* ========================================
   Modals
   ======================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 39, 68, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    border-top: 3px solid var(--accent);
}

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

.modal-small .modal-content {
    max-width: 400px;
}

.modal-large .modal-content {
    max-width: 600px;
}

@media (min-width: 640px) {
    .modal {
        align-items: center;
    }
    
    .modal-content {
        border-radius: var(--radius-xl);
        margin: 20px;
    }
}

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

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer.hidden {
    display: none;
}

/* Buttons */
.btn-primary {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-accent);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.4);
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 12px 24px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Input */
.input-text {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: var(--transition);
}

.input-text:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

/* Upload Options */
.upload-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.upload-option {
    cursor: pointer;
}

.upload-option input {
    display: none;
}

.option-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 10px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.option-icon.camera {
    background: var(--gradient-primary);
    color: #ffffff;
}

.option-icon.gallery {
    background: var(--gradient-accent);
    color: var(--primary-dark);
}

.option-icon.files {
    background: linear-gradient(135deg, var(--secondary) 0%, #1f7a5c 100%);
    color: #ffffff;
}

.option-icon svg {
    width: 32px;
    height: 32px;
}

.upload-option:hover .option-icon {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-option:active .option-icon {
    transform: scale(0.95);
}

.upload-option span {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Upload Queue */
.upload-queue {
    margin-top: 24px;
    border-top: 1px solid var(--gray-200);
    padding-top: 24px;
}

.upload-queue.hidden {
    display: none;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

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

.queue-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.queue-thumb-video,
.queue-thumb-file {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    color: var(--text-muted);
}

.queue-hidden-count {
    text-align: center;
    padding: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
}

.upload-tip {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.upload-add-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    margin-top: 12px;
    border-top: 1px solid var(--border-color);
}

.upload-add-more label {
    cursor: pointer;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--primary);
    transition: var(--transition);
}

.upload-add-more label:hover {
    background: var(--primary);
    color: white;
}

#upload-total-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.queue-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-size {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.queue-progress {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.queue-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.queue-status {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.queue-status.success {
    color: var(--secondary);
}

.queue-status.error {
    color: var(--danger);
}

.queue-remove {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.queue-remove:hover {
    background: var(--gray-200);
    color: var(--danger);
}

/* Context Options */
.context-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.context-btn {
    width: 100%;
    padding: 16px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 14px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.context-btn:hover {
    background: var(--border-light);
}

.context-btn svg {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
}

.context-btn.danger {
    color: var(--danger);
}

.context-btn.danger svg {
    color: var(--danger);
}

.context-btn.danger:hover {
    background: rgba(197, 48, 48, 0.1);
}

/* History */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.history-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-icon.image {
    background: var(--gradient-accent);
    color: var(--primary-dark);
}

.history-icon.video {
    background: var(--gradient-primary);
    color: #ffffff;
}

.history-icon.file {
    background: linear-gradient(135deg, var(--secondary) 0%, #1f7a5c 100%);
    color: #ffffff;
}

.history-icon svg {
    width: 22px;
    height: 22px;
}

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

.history-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 2px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-dark);
    color: #ffffff;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    animation: toastIn 0.3s ease;
    border-left: 3px solid var(--accent);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast.hidden {
    display: none;
}

.toast.success {
    background: var(--secondary);
    border-left-color: #1f7a5c;
}

.toast.error {
    background: var(--danger);
    border-left-color: #9b2c2c;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 380px) {
    .upload-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .option-icon {
        width: 60px;
        height: 60px;
    }
    
    .option-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* Mobile Responsive */
@media (max-width: 400px) {
    .header {
        padding: 6px 10px;
    }
    
    .header-left h1 {
        font-size: 0.85rem;
        max-width: 120px;
    }
    
    .btn-icon {
        width: 32px;
        height: 32px;
    }
    
    .btn-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .folder-item, .file-item {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .item-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    .item-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .item-name {
        font-size: 0.8rem;
    }
    
    .item-meta {
        font-size: 0.65rem;
    }
    
    .item-actions .btn-icon {
        width: 24px;
        height: 24px;
    }
    
    .item-actions .btn-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .content {
        padding: 8px;
    }
    
    .folder-list {
        gap: 6px;
    }
    
    .breadcrumb {
        padding: 8px 10px;
    }
}

/* ========================================
   File Viewer Modal
   ======================================== */

.viewer-modal {
    align-items: center;
    justify-content: center;
}

.viewer-modal .modal-overlay {
    background: rgba(0, 0, 0, 0.95);
}

.viewer-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.viewer-title {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.viewer-actions {
    display: flex;
    gap: 8px;
}

.viewer-actions .btn-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.viewer-actions .btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.viewer-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 16px;
    overflow: hidden;
    position: relative;
}

.viewer-loading {
    text-align: center;
    color: #ffffff;
    position: absolute;
}

.viewer-loading.hidden {
    display: none !important;
}

.viewer-loading .spinner {
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: var(--accent);
}

.viewer-image {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.viewer-image.hidden {
    display: none !important;
}

.viewer-video {
    max-width: 100%;
    max-height: calc(100vh - 160px);
    border-radius: var(--radius-sm);
    background: #000;
    /* Garantir que controles do vídeo funcionem */
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-touch-callout: default;
}

/* Garantir que controles nativos do vídeo sejam clicáveis */
.viewer-video::-webkit-media-controls {
    pointer-events: auto;
}

.viewer-video::-webkit-media-controls-panel {
    pointer-events: auto;
}

.viewer-video::-webkit-media-controls-timeline {
    pointer-events: auto;
}

/* Quando é vídeo, ajustar layout para não sobrepor controles do player */
.viewer-modal.viewing-video .viewer-body {
    padding-bottom: 20px;
}

.viewer-modal.viewing-video .viewer-nav {
    position: relative;
    bottom: auto;
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius);
    margin: 10px auto;
    width: fit-content;
    padding: 8px 20px;
}

.viewer-video.hidden {
    display: none !important;
}

.viewer-pdf {
    width: 100%;
    height: calc(100vh - 140px);
    max-width: 900px;
    border-radius: var(--radius-sm);
    background: #fff;
}

.viewer-pdf.hidden {
    display: none !important;
}

.viewer-unsupported {
    text-align: center;
    color: #ffffff;
    padding: 40px;
    position: absolute;
}

.viewer-unsupported.hidden {
    display: none !important;
}

.viewer-unsupported svg {
    opacity: 0.5;
    margin-bottom: 16px;
}

.viewer-unsupported p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.viewer-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.5);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.viewer-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    width: 44px;
    height: 44px;
}

.viewer-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.viewer-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.viewer-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    min-width: 60px;
    text-align: center;
}

/* Safe area for iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    #main-screen {
        padding-bottom: calc(100px + env(safe-area-inset-bottom));
    }
    
    .fab {
        bottom: calc(24px + env(safe-area-inset-bottom));
    }
    
    .fab-secondary {
        bottom: calc(96px + env(safe-area-inset-bottom));
    }
}

@supports (padding-top: env(safe-area-inset-top)) {
    .header {
        padding-top: calc(8px + env(safe-area-inset-top));
    }
}

/* Modal Dark Theme Support */
body.dark-theme .modal-content {
    background: var(--bg-card);
}

body.dark-theme .modal-header {
    border-color: var(--border-color);
}

body.dark-theme .modal-footer {
    border-color: var(--border-color);
}

body.dark-theme .dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

body.dark-theme .dropdown-menu button {
    color: var(--text-primary);
}

body.dark-theme .dropdown-menu button:hover {
    background: var(--border-light);
}

body.dark-theme .input-text {
    background: var(--bg-input);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-theme .btn-close {
    background: var(--border-color);
    color: var(--text-secondary);
}

body.dark-theme .upload-option span {
    color: var(--text-primary);
}

body.dark-theme .queue-item {
    background: var(--bg-main);
}

body.dark-theme .context-btn {
    background: var(--bg-main);
    color: var(--text-primary);
}

body.dark-theme .history-item {
    background: var(--bg-main);
}

body.dark-theme .btn-secondary {
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark-theme .btn-secondary:hover {
    background: var(--border-light);
}

/* Sort Menu */
.sort-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.sort-menu {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    overflow: hidden;
}

.sort-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

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

.sort-option.active {
    color: var(--primary-color);
    font-weight: 600;
}

.sort-option svg {
    color: var(--primary-color);
}

/* Queue Compact Mode */
.queue-compact {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    text-align: center;
}

.queue-compact-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.queue-compact-header svg {
    color: var(--primary);
}

.queue-compact-info {
    text-align: left;
}

.queue-compact-info strong {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.queue-compact-types {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.queue-compact-progress {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0 8px;
}

.queue-compact-progress-bar {
    height: 100%;
    background: var(--success);
    transition: width 0.3s ease;
}

.queue-compact-status {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.queue-compact-status .uploading {
    color: var(--primary);
    font-weight: 500;
}

.queue-compact-status .error {
    color: var(--danger);
}

.queue-compact-clear {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.queue-compact-clear:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* File Select Loading Overlay (iOS) */
#file-select-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#file-select-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.file-select-loading {
    background: var(--bg-card);
    padding: 32px 48px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.file-select-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

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

.file-select-loading p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.file-select-loading small {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    max-width: 250px;
}

/* Video placeholder when no thumbnail */
.item-thumbnail.no-thumb {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-icon-placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.video-icon-placeholder svg {
    width: 32px;
    height: 32px;
}

/* Drag and Drop Zone */
.drop-zone-active {
    position: relative;
}

.drop-zone-active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 58, 95, 0.1);
    z-index: 999;
    pointer-events: none;
}

.drop-zone-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border: 3px dashed var(--primary);
    border-radius: var(--radius-lg);
    padding: 60px 80px;
    text-align: center;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    animation: dropZonePulse 1.5s ease-in-out infinite;
}

@keyframes dropZonePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.02); }
}

.drop-zone-overlay svg {
    width: 64px;
    height: 64px;
    color: var(--primary);
    margin-bottom: 16px;
}

.drop-zone-overlay h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.drop-zone-overlay p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Floating Upload Progress */
.floating-upload {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--border);
}

.floating-upload.hidden {
    display: none;
}

.floating-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
}

.floating-upload-header span {
    font-weight: 600;
    font-size: 0.95rem;
}

.floating-upload-header .btn-icon-small {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.floating-upload-header .btn-icon-small:hover {
    opacity: 1;
}

.floating-upload-queue {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}

.floating-upload-queue .queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 6px;
}

.floating-upload-queue .queue-item:last-child {
    margin-bottom: 0;
}

.floating-upload-queue .queue-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.floating-upload-queue .queue-thumb-file,
.floating-upload-queue .queue-thumb-video {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
}

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

.floating-upload-queue .queue-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.floating-upload-queue .queue-size {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.floating-upload-queue .queue-progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

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

.floating-upload-queue .queue-status {
    font-size: 0.7rem;
    margin-top: 2px;
}

.floating-upload-queue .queue-status.pending {
    color: var(--text-muted);
}

.floating-upload-queue .queue-status.uploading {
    color: var(--accent);
}

.floating-upload-queue .queue-status.success {
    color: #10b981;
}

.floating-upload-queue .queue-status.error {
    color: #ef4444;
}

.floating-upload-queue .queue-remove {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
}

.floating-upload-queue .queue-remove:hover {
    background: var(--border);
    color: var(--text);
}

.floating-upload-queue .queue-remove:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .floating-upload {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* Modal Mover */
.modal-move {
    max-width: 480px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-move .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-move .modal-header h2 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

#move-item-count {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.move-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.move-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.move-back-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.move-back-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.move-back-btn svg {
    width: 20px;
    height: 20px;
}

.move-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    padding: 4px 0;
    font-size: 0.9rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.move-breadcrumb::-webkit-scrollbar {
    display: none;
}

.move-breadcrumb-item {
    color: var(--primary);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

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

.move-breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    color: var(--text-muted);
    font-weight: bold;
}

.move-breadcrumb-item.current {
    color: var(--text);
    font-weight: 600;
    background: var(--bg);
    cursor: default;
}

.move-breadcrumb-item.current:hover {
    background: var(--bg);
}

.move-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 !important;
    min-height: 150px;
    max-height: 45vh;
    -webkit-overflow-scrolling: touch;
}

.move-folder-list {
    display: block;
}

.move-folder-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.15s;
    border-bottom: 1px solid var(--border);
    user-select: none;
}

.move-folder-item:last-child {
    border-bottom: none;
}

.move-folder-item:hover {
    background: var(--bg-secondary);
}

.move-folder-item:active {
    background: var(--border);
    transform: scale(0.99);
}

.move-folder-item .folder-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.move-folder-item .folder-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.move-folder-item .folder-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.move-folder-item .folder-arrow {
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.5;
    transition: all 0.2s;
}

.move-folder-item:hover .folder-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.move-loading,
.move-empty {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    color: var(--text-muted);
    gap: 12px;
    text-align: center;
    min-height: 200px;
}

.move-loading:not(.hidden),
.move-empty:not(.hidden) {
    display: flex;
}

.move-loading.hidden,
.move-empty.hidden {
    display: none !important;
}

.move-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.move-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

.move-empty p {
    font-weight: 500;
    color: var(--text);
    margin: 0;
}

.move-empty span {
    font-size: 0.85rem;
}

.move-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px !important;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.move-destination {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: 8px;
    border: 2px solid var(--primary);
}

.move-destination svg {
    width: 24px;
    height: 24px;
    color: #ffb300;
    flex-shrink: 0;
}

.move-destination span {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.move-actions button {
    flex: 1;
    padding: 12px 16px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.move-actions button svg {
    width: 18px;
    height: 18px;
}

#btn-confirm-move {
    background: #1a73e8;
    color: white;
    font-weight: 600;
    border: none;
}

#btn-confirm-move:hover {
    background: #1557b0;
}

#btn-confirm-move svg {
    stroke: white;
}

/* Mobile responsivo */
@media (max-width: 480px) {
    .modal-move {
        width: 100%;
        max-width: 100%;
        height: 90vh;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        margin: 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
    
    .move-body {
        max-height: none;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .move-folder-item {
        padding: 16px 20px;
    }
    
    .move-navigation {
        padding: 10px 16px;
    }
    
    .move-footer {
        padding: 14px 16px !important;
    }
    
    .move-actions {
        flex-direction: column-reverse;
    }
    
    .move-actions button {
        padding: 14px;
    }
}
