/* ============================================
   校园电话本
   ============================================ */
:root {
  --cyan: #0ea5e9;
  --cyan-light: rgba(14, 165, 233, 0.1);
  --cyan-border: rgba(14, 165, 233, 0.35);
  --cyan-dark: #0284c7;
}

/* 顶部标题栏 */
#officehall-page .sub-page-back {
  border-color: var(--cyan);
  color: var(--cyan);
}

#officehall-page .sub-page-back:hover {
  background: var(--cyan-light);
}

#officehall-page .sub-page-title {
  color: var(--cyan);
}

/* 电话本内容区 */
.officehall-content {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 分组切换栏 */
.officehall-category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 4px;
  padding-bottom: 4px;
}

.officehall-category-tabs::-webkit-scrollbar {
  display: none;
}

.officehall-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border: 1.5px solid var(--cyan);
  background: var(--glass);
  border-radius: 14px;
  font-size: 14px;
  color: var(--subtext);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
  backdrop-filter: blur(5px);
}

.officehall-tab.active {
  background: var(--cyan);
  color: #fff;
  border-color: var(--cyan);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.officehall-tab:active {
  transform: scale(0.95);
}

/* 企业微信提示栏 */
.wecom-tip-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: var(--glass);
  border: 1.5px solid var(--cyan-border);
  border-radius: 12px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.wecom-tip-bar:active {
  transform: scale(0.98);
  background: var(--cyan-light);
}

.wecom-tip-bar img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
}

.wecom-tip-bar span {
  font-size: 13px;
  color: var(--cyan);
  font-weight: 500;
  line-height: 1.5;
  pointer-events: none;
}

/* ============================================
   搜索框（修复）
   ============================================ */
.search-input-wrapper {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.search-input-wrapper > i:first-child {
  font-size: 16px;
  color: var(--subtext);
  opacity: 0.6;
  flex-shrink: 0;
}

.search-input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  min-width: 0;
}

.search-input-wrapper input::placeholder {
  color: var(--subtext);
  opacity: 0.6;
}

/* 联系人列表 - 卡片包裹 */
.contact-list {
  display: flex;
  flex-direction: column;
  background: var(--glass);
  border: 1.5px solid var(--cyan-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: transparent;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item:active {
  transform: scale(0.98);
  background: var(--cyan-light);
}

.contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--cyan);
}

.contact-phone {
  font-size: 13px;
  color: var(--subtext);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 统一青蓝色边框+图标按钮 */
.contact-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--cyan);
  background: transparent;
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 16px;
  padding: 0;
}

.contact-btn:active {
  transform: scale(0.9);
  background: var(--cyan-light);
}

/* 空状态 */
.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--subtext);
  opacity: 0.7;
}

.search-empty-state i {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* 加载中 */
.search-loading {
  text-align: center;
  font-size: 13px;
  color: var(--subtext);
  padding: 20px 0;
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --cyan: #38bdf8;
    --cyan-light: rgba(56, 189, 248, 0.15);
    --cyan-border: rgba(56, 189, 248, 0.4);
    --cyan-dark: #0ea5e9;
  }

  .contact-name {
    color: var(--cyan);
  }

  .contact-btn {
    border-color: var(--cyan);
    color: var(--cyan);
  }

  .wecom-tip-bar span {
    color: var(--cyan);
  }

  .officehall-tab.active {
    background: var(--cyan);
    border-color: var(--cyan);
    color: #1e1e1e;
  }
}
