/**
 * 调解诉讼系统布局 - 参考 11-operation 紧凑布局
 */
* { margin: 0; padding: 0; box-sizing: border-box; }

.layout-root {
  display: flex;
  min-height: 100vh;
  background: #f8f9fa;
}

.layout-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: rgba(0, 87, 146, 0.85);
  backdrop-filter: blur(15px);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
}

.sidebar-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
}

.sidebar-title span { color: #fff; }

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.menu-group-title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  padding: 14px 20px 6px;
  margin-top: 4px;
  letter-spacing: 0.5px;
}
.menu-group-title:first-child { margin-top: 0; padding-top: 10px; }

.menu-list { list-style: none; margin: 0; padding: 0; }

.menu-item { margin: 2px 12px; }

.menu-link {
  width: 100%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.menu-item.active .menu-link,
.menu-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.menu-item.active .menu-link {
  background: rgba(255, 255, 255, 0.2);
  border-right: 3px solid #3498db;
}

.sidebar-footer {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logout {
  width: calc(100% - 24px);
  margin: 0 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 14px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* 主内容区：为顶栏和侧栏预留空间，更紧凑 */
.layout-main {
  flex: 1;
  margin-left: 280px;
  margin-top: 60px;
  margin-right: 20px;
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  width: calc(100vw - 280px - 20px);
  max-width: calc(100vw - 280px - 20px);
}

.layout-header {
  position: fixed;
  top: 0;
  left: 280px;
  right: 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(52, 152, 219, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  z-index: 999;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 返回按钮 */
.header-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.header-back-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* 用户名 */
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2c3e50;
  font-size: 14px;
}

.user-info i { color: #3498db; }

/* 账户资料、修改密码：低视觉优先级 */
.profile-btn,
.change-password-btn {
  padding: 8px 16px;
  background: #f2f2f2;
  color: #000;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-btn:hover,
.change-password-btn:hover {
  background: #e8e8e8;
  color: #000;
  transform: translateY(-1px);
}

.logout-btn {
  padding: 8px 16px;
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logout-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.layout-content {
  flex: 1;
  padding: 0;
  overflow: hidden;
}

#mainFrame {
  width: 100%;
  height: calc(100vh - 60px);
  border: none;
  display: block;
}

@media (max-width: 768px) {
  .layout-sidebar { width: 200px; }
  .layout-main { margin-left: 200px; width: calc(100vw - 200px - 12px); max-width: none; }
  .layout-header { left: 200px; right: 12px; padding: 0 12px; }
  .header-back-btn span,
  .profile-btn span,
  .change-password-btn span { display: none; }
}
