/* archive-base.css - Core styles for Archive Management System */

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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border-color: rgba(148, 163, 184, 0.1);
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: #334155;
    line-height: 1.6;
}

/* Navigation Styles */
.nav-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    color: white;
    background: #7c63d8;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link.active {
    background: #5a41b6;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.btn-logout {
    padding: 8px 18px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Main Layout */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
}

.page-header {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    text-align: center;
    border: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-section {
    background: var(--card-bg);
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 15px 60px rgba(0,0,0,0.12);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.content-section h2 {
    color: var(--text-primary);
    font-size: 1.8em;
    margin-bottom: 24px;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

/* Upgrade Banner - Fixed positioning */
.upgrade-banner {
    position: sticky;
    top: 60px; /* Below nav */
    z-index: 999;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px;
    margin: -16px -16px 16px -16px; /* Negative margins to span full width */
    border-radius: 0;
    animation: slideDown 0.5s ease;
}

.upgrade-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.upgrade-text {
    font-weight: 600;
    font-size: 1rem;
}

.upgrade-button {
    padding: 6px 16px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.upgrade-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

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

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    font-size: 0.9rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.05) 100%);
    color: #166534;
    border-color: #22c55e;
}

.alert-info {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.05) 100%);
    color: #0369a1;
    border-color: #4facfe;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(185, 28, 28, 0.05) 100%);
    color: #7f1d1d;
    border-color: #dc2626;
}

/* Loading Status Bar */
.loading-status-bar {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
    padding: 12px 20px;
    border-radius: 10px;
    margin: 16px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

/* Stats Grid */
.stats-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* Common utilities */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

@media (max-width: 768px) {
    .main-container {
        padding: 8px;
    }
    
    .upgrade-banner {
        margin: -8px -8px 8px -8px;
    }
    
    .upgrade-content {
        flex-direction: column;
        gap: 8px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
}
