﻿.app-shell { display: grid; grid-template-columns: 300px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #0f2f3d 0%, #133f52 100%);
  color: #e6f2f7;
  padding: 16px 12px;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.08);
}
.sidebar-head { padding: 6px 10px 12px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 10px; }
.sidebar-head h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.sidebar-role { margin: 6px 0 0; font-size: 12px; color: #b8d8e5; }
.menu-group { margin-bottom: 12px; }
.menu-group-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: #9ec5d5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  margin: 0 0 6px;
  cursor: pointer;
}
.menu-group-title { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #9ec5d5; text-align: left; }
.menu-group-arrow { font-size: 11px; transition: transform .15s ease; }
.menu-group-links { display: grid; gap: 4px; max-height: 500px; overflow: hidden; transition: max-height .2s ease, opacity .2s ease; opacity: 1; }
.menu-group.collapsed .menu-group-links { max-height: 0; opacity: 0; }
.menu-group.collapsed .menu-group-arrow { transform: rotate(-90deg); }
.menu-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: #d8ebf4; margin-bottom: 0; font-size: 13px; }
.menu-link-icon {
  width: 18px;
  min-width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #9cf0dd;
  background: rgba(255,255,255,.05);
}
.menu-link.active, .menu-link:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }

.main { display: grid; grid-template-rows: 64px 1fr; min-width: 0; }
.topbar { background: var(--panel); border-bottom: 1px solid var(--line); padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
#btn-menu { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 18px; line-height: 1; }

.lang-switch { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.lang-switch select { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 4px 6px; font-size: 12px; color: var(--text); }
.content { padding: 16px; min-width: 0; }

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 16, 24, .45);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  #btn-menu { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(86vw, 320px);
    z-index: 1100;
    transform: translateX(-102%);
    transition: transform .2s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
}
