/* ============================================================
   layout.css - 側邊欄 + 多頁版型
   ============================================================ */

.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ============ 側邊欄 ============ */
.sidebar {
  width: 220px;
  background: linear-gradient(180deg, #134E58 0%, #0F3D45 100%);
  color: white;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #4DD0DA, #19A8B5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-logo-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 12px;
}

.sidebar-section-label {
  font-size: 12px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  padding: 12px 12px 6px;
  letter-spacing: 1px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 2px 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  transition: all 0.15s;
  user-select: none;
  background: transparent;
  border: none;
  text-align: left;
  width: 100%;
}
.sidebar-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}
.sidebar-item.active {
  background: linear-gradient(135deg, var(--smog-primary), var(--smog-primary-hover));
  color: white;
  box-shadow: 0 4px 10px rgba(25, 168, 181, 0.4);
  font-weight: 600;
}

.sidebar-item-icon {
  font-size: 18px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-item-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.sidebar-item.active .sidebar-item-badge {
  background: rgba(255,255,255,0.25);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ============ 主內容區 ============ */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.main-topbar {
  background: white;
  border-bottom: 1px solid var(--c-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.main-topbar-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--c-text);
}
.main-topbar-subtitle {
  font-size: 15px;
  color: var(--c-text-mute);
  margin-top: 4px;
}

.main-content {
  flex: 1;
  overflow: auto;
  background: var(--c-bg);
}

/* ============ 頁面通用容器 ============ */
.page-container {
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--c-border);
  background: white;
}

.page-body {
  flex: 1;
  overflow: auto;
  padding: 20px 24px;
}

/* ============ Stub 頁面 ============ */
.page-stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--c-text-mute);
  padding: 60px;
  text-align: center;
}
.page-stub-icon {
  font-size: 72px;
  margin-bottom: 16px;
  opacity: 0.4;
}
.page-stub-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 8px;
}
.page-stub-desc {
  font-size: 18px;
  max-width: 400px;
  line-height: 1.6;
}
