/* DevSuite Platform – common layout (1:1 with screenshot) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background-color: #f5f5f5;
}

a {
  color: #2563eb;
  text-decoration: none;
}

/* 全产品：可点击元素移入为手形，移出恢复默认 */
a,
button:not(:disabled),
select,
[role="button"],
[role="combobox"] {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a:hover {
  text-decoration: underline;
}

.workspace .app-header .user-info,
.workspace .app-header .user-info .user-dropdown-panel .dropdown-option,
.nav-item,
.header-icon-btn {
  cursor: pointer;
}

/* --- Workspace: header + sidebar + main --- */
.workspace {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background-color: #f5f5f5;
}

/* Top header – dark bar */
.workspace .app-header {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 24px;
  background-color: #1a1d26;
  color: #fff;
}

.workspace .app-header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.workspace .top-header-logo-wrap {
  display: flex;
  align-items: center;
  width: 240px;
  max-width: 240px;
  min-height: 32px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.workspace .top-header-logo {
  height: 28px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.workspace .top-header-logo-fallback {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: #edb500;
  line-height: 1;
}

/* Header right: icons + user block */
.workspace .app-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace .header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  text-decoration: none;
}

.workspace .header-icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.workspace .header-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* User block – two lines + dropdown arrow */
.workspace .app-header .user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  user-select: none;
  padding: 8px 12px;
  margin: -8px -12px -8px 0;
  border-radius: 6px;
}

.workspace .app-header .user-info.user-dropdown-wrap:hover {
  background: rgba(255, 255, 255, 0.08);
}

.workspace .app-header .user-info .user-info-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.3;
}

.workspace .app-header .user-info .user-account {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

.workspace .app-header .user-info .user-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.workspace .app-header .user-info .user-dropdown-arrow {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 4px;
}

/* User dropdown panel */
.workspace .app-header .user-info .user-dropdown-panel {
  position: absolute;
  left: auto;
  right: 0;
  top: calc(100% + 4px);
  min-width: 200px;
  max-width: 280px;
  padding: 6px 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  box-sizing: border-box;
}

.workspace .app-header .user-info .user-dropdown-panel.hidden {
  display: none;
}

.workspace .app-header .user-info .user-dropdown-panel .dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-align: left;
  text-decoration: none;
  color: #333;
  background: transparent;
  border: none;
  width: 100%;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.workspace .app-header .user-info .user-dropdown-panel .dropdown-option:hover {
  background: #f1f5f9;
  color: #333;
  text-decoration: none;
}

.workspace .app-header .user-info .user-dropdown-panel .dropdown-option svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  fill: #64748b;
}

/* Body: sidebar + main */
.workspace-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* Sidebar – 宽度与 logo 一致 240px，菜单圆角、间距优化 */
.workspace .sidebar {
  width: 240px;
  flex: 0 0 240px;
  background-color: #fafafa;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.workspace .nav-menu {
  padding: 28px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.workspace .nav-menu > * {
  flex: 0 0 auto;
  min-width: 0;
}

.workspace .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 14px;
  color: #666;
  transition: background-color 0.2s, color 0.2s;
  text-decoration: none;
  border-radius: 8px;
}

.workspace .nav-item:hover {
  background-color: #f0f0f0;
  color: #333;
  text-decoration: none;
}

.workspace .nav-item.active {
  background-color: #f0f0f0;
  color: #1a1a1a;
  font-weight: 500;
}

.workspace .nav-item .nav-item-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: #64748b;
}

.workspace .nav-item.active .nav-item-icon {
  fill: #edb500;
}

.workspace .sidebar-footer {
  margin-top: auto;
  padding: 12px 12px 24px;
  border-top: 1px solid #e8e8e8;
}

.workspace .sidebar-footer .nav-item {
  margin: 0;
}

/* Main content */
.workspace .main {
  flex: 1;
  min-width: 0;
  padding: 24px;
  overflow-y: auto;
  background-color: #fff;
}

.workspace .main-placeholder {
  color: #666;
  font-size: 14px;
}

.workspace .main-placeholder h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: #333;
}

/* Block Watch：主区域底部留白收窄，与上部一致 */
.workspace .main.bw-main {
  padding-bottom: 4px;
}
