/* 新版布局系统 - 顶部导航模式 */
:root {
  --max-width: 1440px;
  --header-height: 70px;
  --footer-height: 60px;
}

.app-container {
  display: grid;
  grid-template-rows: var(--header-height) 1fr auto;
  min-height: 100vh;
  min-width: 50vw;
}

/* 顶部复合导航栏 */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--gao-color1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  height: 88px;
}

.nav-brand {
  display: flex;
  align-items: center;
  margin-right: 1.5rem;
  height: 70%;
  background-color: transparent;
}

.nav-brand .logo {
  height: 100%;
  margin-right: 1rem;
}

.nav-brand h1 {
  display: none; /* 隐藏"接单宝"文字 */
}

.nav-menu {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
  height: 70%;
}

.nav-item {
  margin-right: 0.5rem;
}

.nav-item a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.25rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 26px;
  transition: all 0.2s ease;
}

.nav-item a:hover {
  color: red;
  
}

.nav-item.active a {
  color: white;
  /*box-shadow: inset 0 -2px 0 var(--primary-color);*/
}

.user-profile {
  display: none; /* 默认隐藏用户信息 */
}

.logged-in .user-profile {
  display: flex; /* 登录后显示用户信息 */
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  color: white;
}

.btn-logout {
  padding: 0.5rem 1rem;
  /*border-radius: 6px;*/
  background: transparent;
  /*border: 1px solid var(--border-color);*/
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  color:blanchedalmond;
  text-decoration: none; /* 强制移除下划线 */
}

.btn-logout:hover {
  background: #f8fafc;
  color:rgb(77, 75, 77);
}

/* 主内容区 */
.app-main {
  padding: 1rem 0.1rem;   /*上下 、左右 的内边距*/
  background-color: #f8fafc;
  min-height: auto;
  overflow-y: auto;
}

/* 提示弹窗样式 */
.tip-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  z-index: 1000;
  max-width: 500px;
  width: 90%;
}

.tip-modal h3 {
  margin-top: 0;
  color: var(--primary-color);
}

.tip-modal ol {
  padding-left: 1.5rem;
}

.tip-modal li {
  margin-bottom: 0.5rem;
}

.tip-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 底部时间栏 */
.app-footer {
  height: 60px;
  background: var(--gao-color1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding: 0 1.5rem;
}

.time-display {
  padding: 0 1rem;
  left: 0;
  position: absolute;
}

@media (max-width: 768px) {
  .app-footer {
    font-size: 0.8rem;
    height: 40px;
  }
  
  .app-main {
    min-height: calc(100vh - var(--header-height) - 40px);
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .app-container {
    min-height: -webkit-fill-available;
    min-height: fill-available;
  }
  
  .app-header {
    padding: 0 0.5rem;
    background: var(--gao-color1);
    height: 50px;
    position: fixed;
    width: 100%;
  }
  
  .app-main {
    padding-top: 50px;
    padding-bottom: 0;
    /* 使用calc计算高度时减去固定header和footer高度 */
    height: calc(100vh - 40px);  /*gao由于存在【padding-top: 50px;】等，此处直接减40px*/
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS滚动优化 */
  }
  
  .app-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 40px;
    z-index: 100;
  }
  
  .nav-brand h1 {
    display: none;
  }
  
  .nav-item a {
    padding: 0 0.5rem;
    font-size: 0.875rem;
  }
  
  .user-profile span {
    display: none;
  }
}
