:root {
    --primary: #3b82f6; /* Modern Blue */
    --sidebar-bg: #0f172a; /* Deep Navy */
    --body-bg: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;
    --radius: 12px;
}

* { box-sizing: border-box; }
body { 
    margin: 0; 
    font-family: 'Inter', sans-serif; 
    background-color: var(--body-bg); 
    color: var(--text-main);
    overflow-x: hidden;
}

.app-wrapper { display: flex; min-height: 100vh; }

/* Sidebar Design */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    padding: 30px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon { font-size: 24px; }
.logo-text { font-size: 20px; font-weight: 700; letter-spacing: -1px; }
.logo-text span { color: var(--primary); }

.sidebar-nav { flex: 1; padding: 10px 15px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item span { font-size: 18px; }
.nav-item:hover, .nav-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--white);
}

.nav-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 20px 0; }
.sidebar-footer { padding: 20px; font-size: 12px; color: #475569; }

/* Main Area & Top Bar */
.main-content { margin-left: 260px; flex: 1; display: flex; flex-direction: column; }

.top-bar {
    height: 70px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-bar input {
    background: #f1f5f9;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    width: 300px;
    outline: none;
}

.content-body { padding: 40px; }

/* Dashboard UI Components */
h1 { font-size: 2rem; font-weight: 700; margin-bottom: 10px; }
p.subtitle { color: var(--text-muted); margin-bottom: 30px; }

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary:hover { opacity: 0.9; }

/* Form Fields */
.form-group { margin-bottom: 20px; }
label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 14px; }
input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
}

/* Dashboard Components */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat-card { background: var(--white); padding: 25px; border-radius: var(--radius); border: 1px solid var(--border); display: flex; align-items: center; gap: 20px; }
.stat-icon { font-size: 32px; background: #f1f5f9; padding: 10px; border-radius: 12px; }
.stat-info h3 { margin: 0; font-size: 14px; color: var(--text-muted); }
.stat-info p { margin: 5px 0 0; font-size: 1.5rem; font-weight: 700; }

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

/* Advanced Builder Styles */
.form-row { display: flex; gap: 20px; }
.section-title { margin-top: 0; margin-bottom: 20px; font-size: 1.1rem; border-bottom: 1px solid var(--border); padding-bottom: 10px; }

.module-card { border-left: 5px solid var(--primary); background: #fdfdfd; }
.module-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.module-number { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 700; margin-bottom: 5px; }
.module-input { font-size: 1.2rem; font-weight: 700; border: none; border-bottom: 2px dashed #e2e8f0; border-radius: 0; padding: 5px 0; background: transparent; color: var(--primary); width: 400px; outline: none; transition: border-color 0.2s; }
.module-input:focus { border-bottom-color: var(--primary); }

.asset-zone { background: #f8fafc; border: 2px dashed var(--border); padding: 20px; border-radius: 10px; margin-top: 20px; }
.dropzone-ui { text-align: center; padding: 20px; color: var(--text-muted); }
.dropzone-ui p { font-size: 13px; margin-top: 10px; }
.file-input { width: 100%; cursor: pointer; }

.rule-toggle { margin-top: 15px; background: #eff6ff; padding: 10px; border-radius: 8px; display: inline-block; }

.btn-secondary { background: #e2e8f0; color: #475569; padding: 12px 24px; border-radius: 8px; border: none; font-weight: 600; cursor: pointer; margin-right: 15px; }
.btn-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; }

.builder-actions { margin-top: 50px; text-align: center; padding-bottom: 100px; }
