/* ==========================================================================
   应用骨架：侧边栏 + 顶栏 + 内容区
   与画布一致：侧栏 240，顶栏 56，内容区 padding 24 / gap 16
   ========================================================================== */

.app {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: var(--page-bg);
}

/* ------------------------------ 侧边栏 ------------------------------ */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar-bg);
  padding: var(--sp-7);
  display: flex;
  flex-direction: column;
  gap: 0;
  align-self: flex-start;
  min-height: 100vh;
  position: sticky;
  top: 0;
}

.brand {
  padding: var(--sp-3) 0 18px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.brand__title {
  font-size: var(--fs-brand);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}
.brand__subtitle {
  font-size: 10px;
  font-weight: 500;
  color: var(--sidebar-brand-sub);
  letter-spacing: 1.2px;
}
.brand__divider {
  width: 100%;
  height: 1px;
  background: var(--sidebar-divider);
}

.nav-group {
  padding: 14px 0 var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.nav-group:first-of-type { padding-top: var(--sp-8); }

.nav-group__label {
  font-size: var(--fs-nav-label);
  font-weight: 500;
  color: var(--sidebar-label);
  letter-spacing: 0.6px;
  padding: 0 var(--sp-5) 6px;
}

.nav-item {
  height: 36px;
  padding: 0 var(--sp-5);
  border-radius: var(--r-btn);
  display: flex;
  align-items: center;
  color: var(--sidebar-text);
  font-size: var(--fs-nav);
  font-weight: 400;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #FFFFFF; }
.nav-item.is-active {
  background: var(--sidebar-active);
  color: #FFFFFF;
  font-weight: 500;
}
.nav-item.is-hidden { display: none; }

/* ------------------------------ 顶栏 ------------------------------ */
.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-7);
  position: sticky;
  top: 0;
  z-index: 20;
}
/* 汉堡菜单：宽屏隐藏，移动端显示（见 mobile.css） */
.topbar__menu { display: none; }
/* 移动端抽屉遮罩：宽屏不可见 */
.sidebar-backdrop { display: none; }
.topbar__title {
  font-size: var(--fs-topbar);
  font-weight: 600;
  color: var(--text-1);
}
.topbar__right {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}
.topbar__bell {
  width: 20px;
  height: 20px;
  display: inline-flex;
  cursor: pointer;
  color: var(--text-3);
  position: relative;
}
.topbar__bell svg { width: 20px; height: 20px; }
.topbar__bell-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid #FFFFFF;
}
.topbar__user {
  font-size: var(--fs-body);
  color: var(--text-1);
}
.topbar__role {
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--r-tag);
  padding: 3px var(--sp-3);
  font-size: var(--fs-nav-label);
  line-height: 1.4;
}

/* ------------------------------ 内容区 ------------------------------ */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--page-bg);
}

.page {
  flex: 1;
  min-width: 0;
  padding: var(--sp-9);
  display: flex;
  flex-direction: column;
  gap: var(--sp-7);
}

/* 页头 */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.page-head__left { display: flex; flex-direction: column; gap: var(--sp-1); }
.page-head__title {
  font-size: var(--fs-title);
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.35;
}
.page-head__subtitle {
  font-size: var(--fs-body);
  color: var(--text-3);
}
.page-head__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* 面包屑 */
.crumb {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-body);
}
.crumb__link { color: var(--primary); cursor: pointer; }
.crumb__link:hover { text-decoration: underline; }
.crumb__sep { color: var(--text-muted); }
.crumb__current { color: var(--text-3); }

/* 两栏布局（新增订单） */
.layout-split {
  display: flex;
  gap: var(--sp-7);
  align-items: flex-start;
}
.layout-split__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-7); }
.layout-split__side { width: 340px; flex: 0 0 340px; display: flex; flex-direction: column; gap: var(--sp-7); }

/* 网格布局（房型卡片） */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(348px, 1fr));
  gap: var(--sp-7);
}
