:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-main: #f9fafb;
    --bg-sidebar: #111827;
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-sidebar: #9ca3af;
    --text-sidebar-active: #ffffff;
    --border: #e5e7eb;
    --white: #ffffff;
    --danger: #ef4444;
    --success: #10b981;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px 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);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-main);
    line-height: 1.5;
}

/* Layout Container */
.app-container { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 50;
}
.sidebar-header {
    padding: 2rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
}
.sidebar-header span { color: var(--primary); margin-right: 4px; }

.nav-menu { flex: 1; padding: 0.5rem; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-sidebar);
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    transition: all 0.2s;
}
.nav-icon {
    width: 1.125rem;
    height: 1.125rem;
    opacity: 0.7;
}
.nav-item:hover .nav-icon, .nav-item.active .nav-icon {
    opacity: 1;
}
.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
}
.nav-item.active {
    background-color: var(--primary);
    color: var(--white);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.user-info { font-size: 0.875rem; margin-bottom: 1rem; }
.user-info strong { display: block; color: var(--white); }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem 3rem;
    max-width: 1200px;
}

/* Public/Login Layout */
.centered-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 1.5rem;
}

/* Components */
.card {
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--border);
}
h2 { font-size: 1.875rem; font-weight: 700; margin-bottom: 1.5rem; letter-spacing: -0.025em; }

.form-group { margin-bottom: 1.25rem; }
label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; color: #374151; }
input[type="text"], input[type="password"], input[type="file"], select, textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.95rem;
    text-decoration: none;
}
.btn-primary { background-color: var(--primary); color: var(--white); }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-outline { background-color: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover { background-color: var(--bg-main); }
.btn-danger { background-color: transparent; border: 1px solid var(--danger); color: var(--danger); }
.btn-danger:hover { background-color: var(--danger); color: var(--white); }

/* Tables */
.table-container { overflow-x: auto; margin-top: 0rem; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { 
    padding: 0.75rem 1rem; 
    background: var(--bg-main); 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    font-weight: 700; 
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
td { padding: 1rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
tr:hover td { background-color: #fcfcfd; }

.badge {
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-gray { background: #f3f4f6; color: #374151; }
.badge-danger { background: #fee2e2; color: #991b1b; }

.alert { padding: 1rem; border-radius: 0.5rem; margin-bottom: 1.5rem; font-size: 0.875rem; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 2rem; }

/* Utility Classes for extraction from inline styles */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.w-full { width: 100%; }
.max-w-600 { max-width: 600px; }
.max-w-400 { max-width: 400px; }
.max-w-500 { max-width: 500px; }
.max-w-1200 { max-width: 1200px; }

/* Landing Page Specific */
.hero-section { text-align: center; padding: 4rem 0; }
.features-grid { padding: 4rem 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.stats-section { margin-top: 4rem; padding: 4rem; background: var(--bg-sidebar); border-radius: 1.5rem; color: white; display: flex; justify-content: space-around; text-align: center; }

/* Split Download Page */
.split-container { display: flex; min-height: 80vh; background: white; border-radius: 1rem; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.split-left { flex: 1; padding: 4rem; display: flex; flex-direction: column; justify-content: center; }
.split-right { flex: 1; background: #f3f4f6; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 500px; }
