/* Modern GNP Cloud Design - 2025 */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --light: #f8fafc;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    font-size: 14px;
}

/* Modern Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar - Glassmorphism Style */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--gray-200);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.sidebar-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.sidebar .components {
    padding: 16px 0;
}

.sidebar .components li {
    margin: 4px 16px;
}

.sidebar .components li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar .components li a:hover {
    background: var(--gray-100);
    color: var(--primary);
    transform: translateX(4px);
}

.sidebar .components li.active a {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.sidebar .components li.active a i {
    color: white;
}

.sidebar .components li a i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
}

/* Main Content */
.content {
    flex: 1;
    margin-left: 280px;
    padding: 24px;
    
    padding-top: 100px;
    background: var(--gray-50);
}

/* Top Navigation - Modern Style */
.navbar {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 0;
}

.navbar-brand {
    font-weight: 800;
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: var(--gray-600) !important;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
    background: var(--gray-100);
}

.navbar-nav .nav-link.active {
    color: var(--primary) !important;
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white !important;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Modern Cards */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 24px;
}

.card-body {
    padding: 24px;
}

/* Modern Buttons */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    padding: 10px 20px;
    border: none;
    transition: all 0.2s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--gray-600);
    font-weight: 500;
}

/* File Items - Modern Style */
.file-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
}

.file-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.file-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    color: var(--gray-500);
    font-size: 13px;
}

.file-actions {
    opacity: 1;
    transition: opacity 0.2s ease;
    display: flex;
    gap: 8px;
}

.file-item:hover .file-actions {
    opacity: 1;
}

/* Upload Drop Zone - Modern */
.upload-drop-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 48px 24px;
    text-align: center;
    background: var(--gray-50);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-drop-zone:hover,
.upload-drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    transform: scale(1.02);
}

.upload-drop-zone i {
    font-size: 48px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

.upload-drop-zone h5 {
    color: var(--gray-700);
    margin-bottom: 8px;
    font-weight: 600;
}

.upload-drop-zone p {
    color: var(--gray-500);
    margin: 0;
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 4px;
    background: var(--gray-200);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    background: white;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .file-item {
        padding: 12px;
    }
    
    .file-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== 파일 이동 관련 스타일 ==================== */

/* 파일 선택 상태 스타일 - 매우 구체적인 선택자 사용 */
.file-list-container .file-item.move-selected,
.filesContainer .file-item.move-selected,
#filesContainer .file-item.move-selected,
div .file-item.move-selected {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    border: 2px solid #6366f1 !important;
    transform: scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
    position: relative !important;
    transition: all 0.3s ease !important;
}

.file-list-container .file-item.move-selected::before,
.filesContainer .file-item.move-selected::before,
#filesContainer .file-item.move-selected::before,
div .file-item.move-selected::before {
    content: '✓' !important;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 28px !important;
    height: 28px !important;
    background: #6366f1 !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: bold !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    pointer-events: none !important;
}

/* 이동 버튼 헤더 스타일 */
.file-actions-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    animation: slideInDown 0.3s ease-out;
}

.file-actions-header .selected-count {
    font-weight: 600;
    font-size: 16px;
}

.file-actions-header .bulk-actions {
    display: flex;
    gap: 12px;
}

.file-actions-header .btn {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    transition: all 0.2s ease;
}

.file-actions-header .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.file-actions-header .btn-primary {
    background: rgba(255, 255, 255, 0.2);
}

.file-actions-header .btn-outline-secondary {
    background: transparent;
}

/* 폴더 선택 모달 스타일 */
.folder-tree {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    background: var(--gray-50);
}

.folder-tree-item {
    padding: 12px 16px;
    margin: 4px 0;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid transparent;
}

.folder-tree-item:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.folder-tree-item.selected {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.folder-tree-item.selected i {
    color: white;
}

.folder-tree-item i {
    color: var(--primary);
    font-size: 18px;
}

.folder-tree-item .folder-name {
    flex: 1;
    font-weight: 500;
}

.folder-tree-item .folder-path {
    font-size: 12px;
    color: var(--gray-500);
}

.folder-tree-item.selected .folder-path {
    color: rgba(255, 255, 255, 0.8);
}

/* 클릭 방지 (액션 버튼 영역) */
.file-item .file-actions {
    pointer-events: auto;
    z-index: 20;
    position: relative;
}

.file-item.move-selected .file-actions {
    opacity: 0.7;
}

/* 애니메이션 */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.file-item.move-selected {
    animation: pulse 2s infinite;
}
