:root {
    --primary: #4338ca;
    --primary-dark: #3730a3;
    --sidebar-bg: #0f172a;
    --sidebar-text: #f8fafc;
    --sidebar-active: #2563eb;
    --bg-main: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #059669;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --sidebar-width: 280px;
    --primary-light: #eef2ff;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
}

/* Layout Structure */
.app-container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 2.5rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 3rem;
}

.sidebar-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.sidebar-header p {
    font-size: 0.85rem;
    opacity: 0.6;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.2s;
}

.nav-item i {
    font-size: 1.125rem;
    width: 20px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-item.active {
    background-color: var(--sidebar-active);
    color: #fff;
}

/* Main Content Area */
.main-viewport {
    padding: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.page-title h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    color: var(--sidebar-bg);
}

/* Card Styling */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Form Styling */
.form-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sidebar-bg);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
}

.form-control[readonly] {
    background-color: #f8fafc;
    cursor: not-allowed;
}

/* Entry Blocks */
.entry-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    position: relative;
    border: 1px solid var(--border);
}

.remove-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.primary-btn {
    background: var(--primary);
    color: #fff;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    transition: background 0.2s;
}

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

.secondary-btn {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.875rem;
}

/* Upload Area */
.file-drop-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    background: #fff;
    cursor: pointer;
}

.file-info-text {
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 0.5rem;
}

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.success-modal {
    background: #fff;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 440px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s infinite linear;
}

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

.hidden { display: none; }
.mt-8 { margin-top: 2rem; }
.flex-end { display: flex; justify-content: flex-end; }

/* Sequential Flow Controls */
.step-nav-buttons {
    display: flex;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.step-nav-buttons .primary-btn, 
.step-nav-buttons .secondary-btn {
    min-width: 140px;
    justify-content: center;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.tab-content {
    animation: fadeIn 0.3s ease-out;
}

@media (max-width: 768px) {
    .app-container { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .main-viewport { padding: 1.5rem; }
    .form-grid { grid-template-columns: 1fr; }
    .step-nav-buttons { flex-direction: column; }
    .step-nav-buttons button { width: 100%; }
}

