* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: sans-serif; line-height: 1.6; color: #333; display: flex; flex-direction: column; min-height: 100vh; background: #f0f2f5; }

.main-header { background: #2c3e50; color: white; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; }
.logo { font-size: 1.5rem; font-weight: bold; }
.top-nav a { color: white; text-decoration: none; margin-left: 1.5rem; transition: color 0.3s; }
.top-nav a:hover, .top-nav a.active { color: #3498db; }
.burger { display: none; background: none; border: 1px solid white; color: white; cursor: pointer; padding: 5px 10px; font-size: 1.2rem; }

.wrapper { display: grid; grid-template-columns: 1fr 280px; flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px; gap: 20px; }
.content { background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); min-height: 400px; }
.main-sidebar { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); align-self: start; }

.side-nav h3 { margin-bottom: 15px; font-size: 1.1rem; border-bottom: 2px solid #3498db; display: inline-block; }
.side-nav ul { list-style: none; }
.side-nav a { display: block; padding: 10px 0; color: #555; text-decoration: none; border-bottom: 1px solid #eee; transition: all 0.3s; }
.side-nav a:hover { padding-left: 5px; color: #3498db; }
.side-nav a.active { color: #3498db; font-weight: bold; }

.widget { margin-top: 30px; padding-top: 20px; border-top: 1px dashed #ccc; font-size: 0.9rem; color: #777; }

.main-footer { background: #333; color: white; text-align: center; padding: 1.5rem; margin-top: auto; }

/* Адаптивность */
@media (max-width: 900px) {
    .wrapper { grid-template-columns: 1fr; }
    .main-sidebar { order: 2; }
    .content { order: 1; }
    .top-nav { display: none; }
    .top-nav.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; width: 100%; background: #2c3e50; padding: 20px; border-top: 1px solid #3e4f5f; }
    .top-nav.open a { margin: 10px 0; }
    .burger { display: block; }
}