:root {
    --primary: #228be6;
    --primary-light: #e7f5ff;
    --primary-hover: #d0ebff;
    --bg: #ffffff;
    --bg-body: #ffffff;
    --text: #212529;
    --text-dimmed: #868e96;
    --border: #dee2e6;
    --radius: 8px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
}
body { font-family: var(--font); background-color: var(--bg-body); color: var(--text); margin: 0; line-height: 1.6; font-size: 16px; display: flex; flex-direction: column; min-height: 100vh; }
.container { max-width: 1000px; margin: 0 auto; padding: 40px 20px; flex: 1; width: 100%; box-sizing: border-box; }

.app-header { background-color: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1100; width: 100%; box-sizing: border-box; }
.app-header-inner { max-width: 1000px; margin: 0 auto; padding: 0 20px; height: 70px; display: flex; justify-content: space-between; align-items: center; }
.app-logo a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.app-logo img { width: 36px; height: 36px; object-fit: contain; }
.app-logo span { font-weight: 700; font-size: 20px; }

.app-header-center { flex: 1; display: flex; justify-content: center; align-items: center; }
.header-title { font-weight: 700; font-size: 13px; color: var(--primary); background: var(--primary-light); padding: 6px 16px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid rgba(51, 154, 240, 0.2); }

.app-header-right { display: flex; align-items: center; gap: 15px; }
.return-link { color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px; transition: all 0.2s; white-space: nowrap; }
.return-link:hover { background-color: #f1f3f5; }

.layout { display: flex; gap: 20px; align-items: flex-start; margin-top: 20px; }

/* Web Components Layout Pre-allocation & Anti-CLS */
help-header { display: block; width: 100%; }
help-header:not(:defined) { height: 71px; background-color: var(--bg); border-bottom: 1px solid var(--border); box-sizing: border-box; }

help-sidebar { display: block; flex: 0 0 280px; width: 280px; position: sticky; top: 40px; box-sizing: border-box; }
.sidebar { flex: 0 0 280px; width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-sizing: border-box; box-shadow: var(--shadow-sm); }
.sidebar-placeholder { min-height: 520px; }

.search-wrapper { position: relative; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 14px; }
.form-control { width: 100%; height: 40px; padding: 0 14px; border: 1px solid #ced4da; border-radius: 8px; box-sizing: border-box; font-family: var(--font); font-size: 14px; transition: border-color 0.15s ease-in-out; }
.form-control:focus { border-color: var(--primary); outline: none; }
textarea.form-control { resize: vertical; min-height: 120px; padding: 10px 14px; height: auto; }
.btn { background-color: var(--primary); color: white; border: none; padding: 0 18px; height: 40px; border-radius: 20px; cursor: pointer; font-weight: 600; font-family: var(--font); width: 100%; transition: background 0.2s; font-size: 14px; margin-top: 8px; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); opacity: 0.5; font-size: 14px; pointer-events: none; }
.search { width: 100%; padding: 10px 10px 10px 32px; border: 1px solid var(--border); border-radius: 6px; box-sizing: border-box; font-family: var(--font); font-size: 14px; }

.menu-group { margin-bottom: 10px; }
.menu-group-title { font-weight: 600; font-size: 14px; padding: 8px 12px; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.chevron { transition: transform 0.2s; font-size: 12px; }
.menu-list { list-style: none; padding: 0; margin: 0; overflow: hidden; max-height: 500px; transition: max-height 0.3s ease-out; }
.menu-list.collapsed { max-height: 0; }
.menu-item { display: block; padding: 8px 12px 8px 38px; text-decoration: none; color: var(--text); font-size: 14px; border-radius: 4px; cursor: pointer; transition: background 0.2s; margin-bottom: 2px; }
.menu-item:hover { background-color: #f1f3f5; }
.menu-item.active { background-color: var(--primary-light); color: var(--primary); font-weight: 500; }

.content-area { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; min-height: 500px; box-sizing: border-box; width: 100%; box-shadow: var(--shadow-sm); }
.content-header { display: flex; justify-content: space-between; align-items: center; }
.content-header h2 { margin: 0; font-size: 26px; font-weight: 700; }
.nav-buttons { display: flex; gap: 8px; }
.icon-btn { background: var(--primary-light); border: none; color: var(--primary); padding: 6px 10px; border-radius: 4px; cursor: pointer; transition: background 0.2s; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.icon-btn:hover { background: var(--primary-hover); }
.icon-btn.disabled { background: #f1f3f5; color: #adb5bd; cursor: not-allowed; pointer-events: none; }

.content-area h3 { margin-top: 25px; margin-bottom: 10px; font-size: 20px; font-weight: 600; }
.divider { height: 2px; background: linear-gradient(90deg, #ced4da 0%, transparent 75%); margin: 20px 0; border-radius: 2px; }

.hamburger { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }
.mobile-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 999; opacity: 0; transition: opacity 0.3s; }
.mobile-header { display: none; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.drawer-close { background: none; border: none; font-size: 24px; cursor: pointer; }

.footer { background-color: var(--bg); border-top: 1px solid var(--border); padding: 40px 20px; margin-top: auto; }
.footer-inner { max-width: 1000px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-logo { flex: 1; min-width: 250px; }
.footer-logo img { width: 40px; height: 40px; }
.footer-logo p { color: var(--text-dimmed); font-size: 14px; margin-top: 15px; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-group { display: flex; flex-direction: column; gap: 12px; }
.footer-group h4 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text); }
.footer-group a { color: var(--text-dimmed); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-group a:hover { color: var(--text); }
.footer-bottom { max-width: 1000px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--border); text-align: left; color: var(--text-dimmed); font-size: 14px; }

@media (max-width: 768px) { 
    .layout { flex-direction: column; } 
    help-sidebar { display: contents; }
    .sidebar-placeholder { display: none !important; }
    .sidebar { position: fixed; top: 0; right: -320px; bottom: 0; width: 280px; z-index: 1000; box-shadow: -2px 0 10px rgba(0,0,0,0.1); transition: right 0.3s ease; height: 100vh; overflow-y: auto; border-radius: 0; border: none; margin: 0; padding: 20px; }
    .sidebar.open { right: 0; }
    .mobile-overlay.open { display: block; opacity: 1; }
    .mobile-header { display: flex; }
    
    .hamburger { display: block; }
    .app-header-center { display: none; }
    .return-link span { display: none; }
    
    .content-area { padding: 20px; border-radius: 0; border: none; background: transparent; box-shadow: none; }
    .footer-links { gap: 30px; }
}
