/* =============== 全局重置与基础样式 =============== */
* {
  box-sizing: border-box;
}
body {
  font-family: "Microsoft YaHei", Arial, sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
  color: #333;
}

/* =============== 登录/入驻页面样式 (apply.html) =============== */
body:has(.login-container) {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
.login-container {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  width: 400px;
  text-align: center;
  max-width: 90%;
}
.login-title {
  color: #333;
  margin-bottom: 20px;
  font-size: 24px;
}
.form-group {
  margin-bottom: 15px;
  text-align: left;
}
label {
  display: block;
  margin-bottom: 5px;
  color: #555;
  font-weight: bold;
}
input[type="text"],
input[type="password"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
button {
  width: 100%;
  padding: 12px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
}
button:hover {
  background-color: #0056b3;
}
.login-container a {
  display: inline-block;
  padding: 10px 15px;
  margin-top: 10px;
  text-decoration: none;
  color: white;
  background-color: #28a745;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
}
.login-container a:hover {
  background-color: #218838;
}

/* =============== 租户主控制台样式 (index.html) =============== */
.header {
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  font-size: 18px;
  font-weight: bold;
  color: #007bff;
}
.top-nav a {
  margin-left: 20px;
  text-decoration: none;
  color: #333;
  font-weight: normal;
}
.top-nav a.active,
.top-nav a:hover {
  color: #007bff;
  font-weight: bold;
}
.content-area {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}
.sub-tabs {
  margin: 15px 0;
}
.sub-tabs a {
  margin-right: 15px;
  text-decoration: none;
  color: #555;
}
.sub-tabs a.active,
.sub-tabs a:hover {
  color: #007bff;
  font-weight: bold;
}
.sub-tab-content {
  display: none;
  margin-top: 15px;
  padding: 15px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 订单项样式 */
.order-item {
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}
.order-item:last-child {
  border-bottom: none;
}
.order-item p {
  margin: 5px 0;
  line-height: 1.5;
}

/* 方案 B：使用 .btn-claim / .btn-complete */
.btn-claim,
.btn-complete {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 8px;
}
.btn-complete {
  background-color: #007bff;
}
.btn-claim:hover {
  background-color: #218838;
}
.btn-complete:hover {
  background-color: #0056b3;
}

/* 表单输入框（租户信息页） */
#profileForm input[type="text"],
#profileForm input[type="tel"] {
  width: 100%;
  max-width: 400px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-top: 5px;
}
#profileForm button {
  width: auto;
  padding: 8px 20px;
  margin-top: 15px;
  background-color: #007bff;
}

/* 二级导航样式（承运商端） */
.has-submenu > .submenu {
  display: none;
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.2);
}

.has-submenu.open > .submenu {
  display: block;
}

.has-submenu > .submenu .nav-item {
  padding-left: 52px;
  border-left: none;
  font-size: 0.95rem;
}

.has-submenu > .submenu .nav-item:hover,
.has-submenu > .submenu .nav-item.active {
  background-color: rgba(255, 255, 255, 0.1);
  padding-left: 55px;
}

.has-submenu > .submenu .nav-item.active {
  border-left: 4px solid var(--primary-color);
}

.submenu-toggle {
  cursor: pointer;
  justify-content: space-between;
  display: flex;
  align-items: center;
}

.submenu-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.has-submenu.open .submenu-arrow {
  transform: rotate(180deg);
}

/* 响应式优化 */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }
  .top-nav {
    margin-top: 10px;
  }
  .top-nav a {
    margin-left: 0;
    margin-right: 15px;
  }
  .content-area {
    padding: 0 15px;
  }
}