.app-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-body {
  display: flex;
  min-height: 100vh;
}

.page-header {
  height: var(--header-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-header .logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
}

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

.page-header .header-user {
  color: var(--color-text-secondary);
  cursor: pointer;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--color-white);
  border-right: 1px solid var(--color-border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 12px 0;
}

.app-sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 15px;
}

.app-sidebar .nav-item:hover {
  background: var(--color-bg-gray);
  color: var(--color-text);
}

.app-sidebar .nav-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-weight: 600;
  border-right: 3px solid var(--color-primary);
}

.app-sidebar .nav-item .nav-icon {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 24px;
  min-height: 100vh;
}

body.page-home .app-main {
  padding: 0;
}

body.page-home .page-container {
  max-width: none;
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
}

.app-tabbar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tabbar-height);
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  z-index: 100;
}

.app-tabbar .tabbar-inner {
  display: flex;
  height: 100%;
}

.app-tabbar .tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--color-text-light);
  cursor: pointer;
  transition: color 0.2s;
  font-size: 11px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.app-tabbar .tab-item .tab-icon {
  font-size: 22px;
  line-height: 1;
}

.app-tabbar .tab-item.active {
  color: var(--color-primary);
}

.app-tabbar .tab-item.tab-highlight .tab-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-text-light);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-top: -22px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  border: 3px solid var(--color-white);
  transition: background 0.2s, box-shadow 0.2s;
}

.app-tabbar .tab-item.tab-highlight.active .tab-icon {
  background: var(--color-primary);
  box-shadow: 0 2px 12px rgba(249, 115, 22, 0.4);
}

.app-tabbar .tab-item.tab-highlight {
  position: relative;
}

@media (max-width: 768px) {
  .app-sidebar {
    display: none;
  }

  .app-main {
    margin-left: 0;
    padding: 16px 0;
    padding-bottom: calc(var(--tabbar-height) + 16px);
    overflow-x: hidden;
  }

  .page-container {
    padding-left: 0;
    padding-right: 0;
  }

  body.page-home .app-main {
    padding: 0;
    padding-bottom: calc(var(--tabbar-height));
  }

  .app-tabbar {
    display: block;
  }

  .page-header {
    padding: 0 16px;
  }

  .page-container {
    padding: 12px 0;
  }

  body.page-home .page-container {
    padding: 0;
  }
}