/* ======================================================== */
/* SHELL LAYOUT & NAVIGATION                                */
/* ======================================================== */
#app-root { display: none; height: 100%; width: 100%; overflow: hidden; }
.sidebar { width: 260px; background-color: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; padding: 24px 16px; flex-shrink: 0; overflow-y: auto; }
.brand-wrapper { margin-bottom: 24px; padding: 0 8px 24px 8px; border-bottom: 1px solid rgba(148, 163, 184, 0.15); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.brand { display: flex; align-items: center; justify-content: center; width: 100%; flex-shrink: 0; }
.brand svg { width: 200px; height: 60px; max-width: 100%; }
.brand-practice-title { font-size: 0.95rem; font-weight: 600; color: #cbd5e1; letter-spacing: 0.3px; width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; line-height: 1.3; }
.nav-container { flex-grow: 1; }
.nav-link { display: flex; align-items: center; padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 0.95rem; margin-bottom: 4px; transition: all 0.2s; }
.nav-link:hover { background-color: var(--sidebar-hover); color: #ffffff; }
.nav-link.active { background-color: var(--accent); color: #ffffff; }
.main-frame { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; min-height: 0; background-color: var(--bg-app); }
.top-bar { min-height: 70px; background-color: #ffffff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 16px 32px; flex-shrink: 0; flex-wrap: wrap; gap: 12px; }
.content-box { padding: 32px; overflow-y: auto; overflow-x: hidden; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.panel { background: var(--panel-bg); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02); min-width: 0; }
.split-pane { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 24px; }
.section-view { display: none; }
.section-view.active-view { display: block; }

/* Responsive Layout */
@media (min-width: 1001px) {
    .mobile-nav-toggle { display: none; }
}

@media (max-width: 1024px) {
    .split-pane { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
    #app-root { flex-direction: column; height: 100%; }
    .sidebar { width: 100%; height: auto; padding: 16px; flex-shrink: 0; position: relative; }
    .brand-wrapper { margin-bottom: 12px; padding-bottom: 8px; flex-direction: row; text-align: left; align-items: center; justify-content: flex-start; padding-left: 48px; gap: 12px; border-bottom: none; }
    .brand { width: auto; flex-shrink: 0; justify-content: flex-start; }
    .brand svg { width: 140px; height: auto; }
    .brand-practice-title { font-size: 0.85rem; margin-left: auto; padding-right: 16px; text-align: right; color: #ffffff; }
    .sidebar-top-row { display: flex; align-items: center; justify-content: space-between; }
    .mobile-nav-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: var(--sidebar-hover); border-radius: 8px; cursor: pointer; flex-shrink: 0; position: absolute; left: 16px; top: 16px; }
    .mobile-nav-toggle svg { width: 22px; height: 22px; stroke: #fff; }
    .nav-container { display: none; flex-direction: column; margin-top: 12px; }
    .nav-container.nav-open { display: flex; }
    .top-bar { padding: 12px 16px; }
    .content-box { padding: 16px; padding-bottom: 100px; }
    .split-pane { grid-template-columns: 1fr; }
}
