:root {
    --m-primary: #0f172a;
    --m-primary-light: #1e293b;
    --m-accent: #0ea5e9;
    --m-accent-hover: #0284c7;
    --m-gold: #f59e0b;
    --m-success: #10b981;
    --m-danger: #ef4444;
    --m-bg: #f8fafc;
    --m-card-bg: #ffffff;
    --m-border: #e2e8f0;
    --m-text-main: #0f172a;
    --m-text-muted: #64748b;
    --m-sidebar-width: 280px;
}

body {
    background-color: var(--m-bg);
    color: var(--m-text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
}

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

.app-sidebar {
    width: var(--m-sidebar-width);
    background-color: var(--m-primary);
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    z-index: 1050;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--m-bg);
}

/* Brand header */
.brand-box {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(14, 165, 233, 0.18);
    color: var(--m-accent);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

/* Sidebar navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    overflow-y: auto;
}

.nav-section-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0.85rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.nav-section-item:hover {
    background-color: var(--m-primary-light);
    color: #ffffff;
}

.nav-section-item.active {
    background: #1e293b;
    color: #ffffff;
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-icon {
    font-size: 1.1rem;
    margin-right: 0.75rem;
}

.nav-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
    background-color: #475569;
}

.nav-status-indicator.completed {
    background-color: var(--m-success);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.nav-status-indicator.in_progress {
    background-color: var(--m-gold);
}

/* Top bar */
.app-topbar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--m-border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-progress-container {
    width: 240px;
}

.progress {
    height: 6px;
    border-radius: 3px;
    background-color: #e2e8f0;
}

.progress-bar {
    background-color: var(--m-accent);
}

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

.card-questionnaire {
    background: #ffffff;
    border: 1px solid var(--m-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 2.25rem;
    margin-bottom: 2rem;
}

.question-block {
    margin-bottom: 2.25rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f1f5f9;
}

.question-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.question-label {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.4rem;
    display: block;
}

.question-help {
    font-size: 0.825rem;
    color: var(--m-text-muted);
    margin-bottom: 0.75rem;
}

/* Custom form elements */
.form-control:focus, .form-select:focus {
    border-color: var(--m-accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.checkbox-custom-card {
    border: 1px solid var(--m-border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
}

.checkbox-custom-card:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.checkbox-custom-card input:checked ~ label {
    font-weight: 600;
    color: var(--m-primary);
}

/* Action bar footer */
.action-bar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--m-border);
}

.btn-primary-marvens {
    background-color: var(--m-primary);
    color: #ffffff;
    border: none;
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.btn-primary-marvens:hover {
    background-color: var(--m-primary-light);
    color: #ffffff;
}

.btn-accent-marvens {
    background-color: var(--m-accent);
    color: #ffffff;
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
}

.btn-accent-marvens:hover {
    background-color: var(--m-accent-hover);
    color: #ffffff;
}

/* Repeatable items */
.repeatable-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Responsive tweaks */
@media (max-width: 992px) {
    .app-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
    }
    .app-sidebar.show {
        left: 0;
        transform: none;
    }
    .content-area {
        padding: 1rem;
    }
    .topbar-progress-container {
        width: 140px;
    }
}
