/* Pandora File Storage - Minimal Login-Only Styles */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --border: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 0.5rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Page Management */
.page {
    min-height: 100vh;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.login-header {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 400px;
    width: 100%;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-header h1 {
    color: var(--text-primary);
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    width: 100%;
    margin-bottom: 1rem;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
    cursor: pointer;
}

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

.google-btn {
    border-color: #ea4335;
    color: #ea4335;
}

.google-btn:hover {
    background: #fef5f5;
    border-color: #e53e3e;
}

.azure-btn {
    border-color: #0078d4;
    color: #0078d4;
}

.azure-btn:hover {
    background: #f0f8ff;
    border-color: #0056b3;
}

/* Flash Messages */
.flash-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    max-width: 400px;
    width: 100%;
}

.flash-error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.flash-success {
    background: #c6f6d5;
    color: #2f855a;
    border: 1px solid #9ae6b4;
}

/* Configuration Form */
.config-section {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    margin-top: 2rem;
    max-width: 400px;
    width: 100%;
}

.config-section label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.config-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s;
    background: var(--surface);
}

.config-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.status-message {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

/* Main App Layout */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

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

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
    margin-right: 1rem;
    padding-right: 1rem;
    border-right: 1px solid var(--border);
}

.user-welcome {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
}


/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.welcome-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.welcome-card i {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

.welcome-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.welcome-card > p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.welcome-info {
    background: var(--surface-hover);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: left;
}

.welcome-info p {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.welcome-info p:last-child {
    margin-bottom: 0;
    color: var(--text-muted);
    font-style: italic;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

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

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

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

.btn-outline:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.btn-link {
    background: transparent;
    color: var(--primary-color);
    border: none;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--primary-hover);
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    transform: translateX(400px);
    transition: transform 0.3s;
}

.toast.show {
    transform: translateX(0);
}

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

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

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

.toast-info {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* File Manager Styles */
.file-manager {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--surface-hover);
    border-bottom: 1px solid var(--border);
}

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

.view-controls {
    display: flex;
    gap: 0.25rem;
}

.view-controls .btn {
    padding: 0.5rem;
    min-width: auto;
}

.view-controls .btn.active {
    background: var(--primary-color);
    color: white;
}

.breadcrumb-container {
    padding: 0.75rem 1rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

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

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: all 0.2s;
}

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

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

.file-browser {
    min-height: 400px;
    position: relative;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.loading-indicator i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.file-list {
    padding: 1rem;
}

.file-list.list-view {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.file-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.file-item:hover {
    background: var(--surface-hover);
    border-color: var(--border);
}

.file-item.selected {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-color);
}

.file-item.grid-view {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
}

.file-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.file-item.grid-view .file-icon {
    width: 3rem;
    height: 3rem;
    font-size: 2rem;
    margin-right: 0;
    margin-bottom: 0.5rem;
}

.file-icon.folder {
    color: #f59e0b;
}

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

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

.file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-item.grid-view .file-name {
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

.file-item.grid-view .file-meta {
    flex-direction: column;
    gap: 0.25rem;
}

.file-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.file-action {
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.file-action:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

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

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.upload-panel {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 350px;
    max-height: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
}

.upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--surface-hover);
    border-bottom: 1px solid var(--border);
}

.upload-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.upload-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
}

.upload-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

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

.upload-filename {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.progress-bar {
    flex: 1;
    height: 0.25rem;
    background: var(--border);
    border-radius: 0.125rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

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

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

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

.progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Download Progress Overlay */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2001;
}

.progress-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    min-width: 400px;
    max-width: 500px;
}

.progress-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.progress-filename {
    font-size: 0.875rem;
    color: var(--text-secondary);
    word-break: break-all;
    margin-bottom: 0.5rem;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.progress-container .progress-bar {
    flex: 1;
    height: 0.5rem;
    background: var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-container .progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-container .progress-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    min-width: 3rem;
    text-align: right;
}

.progress-status {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Context Menu */
.context-menu {
    position: fixed;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.25rem 0;
    z-index: 2000;
    min-width: 150px;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: var(--surface-hover);
}

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

.context-menu-separator {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}

/* Drag and Drop */
.file-list.drag-over {
    background: rgba(37, 99, 235, 0.1);
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-header {
        padding: 2rem;
    }
    
    .config-section {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .user-info {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .welcome-card {
        padding: 2rem;
    }
    
    .welcome-card i {
        font-size: 3rem;
    }
    
    .welcome-card h2 {
        font-size: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .toolbar-left, .toolbar-right {
        justify-content: center;
    }
    
    .file-list.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .upload-panel {
        left: 1rem;
        right: 1rem;
        width: auto;
    }
    
    .file-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
}