/* ========================================
   企业服务小程序 - 纯HTML/CSS/JS版本
   现代简约企业风
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #F8FAFC;
  color: #1E293B;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px;
  max-width: 100%;
  overflow-x: hidden;
}

/* ========================================
   Header 样式
   ======================================== */

.header {
  background: #FFFFFF;
  padding: 16px;
  border-bottom: 1px solid #F1F5F9;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  font-size: 28px;
  font-weight: 700;
  color: #1E293B;
}

.header-subtitle {
  font-size: 14px;
  color: #64748B;
  margin-top: 2px;
}

.header-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: #EFF6FF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.header-btn:active {
  transform: scale(0.95);
  background-color: #DBEAFE;
}

.header-btn i {
  font-size: 20px;
  color: #1E40AF;
}

/* ========================================
   Stats Banner
   ======================================== */

.stats-banner {
  display: flex;
  margin: 16px;
  padding: 16px 20px;
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.06);
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #1E40AF;
}

.stat-label {
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: #E2E8F0;
  margin: 4px 0;
}

/* ========================================
   Section Header
   ======================================== */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 16px 12px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1E293B;
}

.section-more {
  font-size: 14px;
  color: #1E40AF;
  font-weight: 500;
  cursor: pointer;
}

/* ========================================
   Company List
   ======================================== */

.company-list {
  padding: 0 16px;
}

.company-card {
  background: #FFFFFF;
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.2s;
}

.company-card:active {
  transform: scale(0.98);
}

.company-image-container {
  position: relative;
  height: 140px;
  overflow: hidden;
}

.company-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company-type-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
}

.company-type-tag.transfer {
  background: #1E40AF;
}

.company-type-tag.acquire {
  background: #059669;
}

.company-content {
  padding: 16px;
}

.company-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.company-name {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #1E293B;
  margin-right: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tax-level-tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.tax-level-tag.level-a {
  background: #ECFDF5;
  color: #059669;
}

.tax-level-tag.level-b {
  background: #FEF3C7;
  color: #D97706;
}

.tax-level-tag.level-c {
  background: #FEF2F2;
  color: #DC2626;
}

.tax-level-tag.level-m {
  background: #EFF6FF;
  color: #2563EB;
}

.tax-level-tag.level-d {
  background: #F5F5F5;
  color: #6B7280;
}

.company-info {
  display: flex;
  margin-bottom: 10px;
}

.info-row {
  display: flex;
  align-items: center;
  margin-right: 16px;
}

.info-row i {
  font-size: 12px;
  color: #9CA3AF;
  margin-right: 4px;
}

.info-row span {
  font-size: 13px;
  color: #64748B;
}

.company-tags {
  display: flex;
  margin-bottom: 12px;
}

.tag {
  background: #F1F5F9;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: #64748B;
  margin-right: 8px;
}

.company-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
}

.view-count {
  display: flex;
  align-items: center;
}

.view-count i {
  font-size: 12px;
  color: #9CA3AF;
  margin-right: 4px;
}

.view-count span {
  font-size: 13px;
  color: #9CA3AF;
}

.contact-btn {
  display: flex;
  align-items: center;
  background: #1E40AF;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.contact-btn:active {
  transform: scale(0.95);
  background: #1E3A8A;
}

.contact-btn i {
  font-size: 12px;
  color: #FFFFFF;
  margin-right: 6px;
}

.contact-btn span {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
}

/* ========================================
   Bottom Navigation
   ======================================== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background: #FFFFFF;
  padding: 8px 0;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid #F1F5F9;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.nav-item .nav-icon {
  font-size: 22px;
  color: #9CA3AF;
  margin-bottom: 2px;
}

.nav-item .nav-label {
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
}

.nav-item.active .nav-icon {
  color: #1E40AF;
}

.nav-item.active .nav-label {
  color: #1E40AF;
}

.nav-item .nav-dot {
  position: absolute;
  bottom: 0;
  width: 5px;
  height: 5px;
  border-radius: 2.5px;
  background: #1E40AF;
  display: none;
}

.nav-item.active .nav-dot {
  display: block;
}

/* ========================================
   Mine Panel
   ======================================== */

.mine-panel {
  min-height: 100vh;
  background: #F8FAFC;
  padding-bottom: 80px;
}

.mine-header {
  display: flex;
  align-items: center;
  padding: 20px 16px;
  background: #1E40AF;
}

.mine-avatar {
  width: 64px;
  height: 64px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  border: 3px solid rgba(255, 255, 255, 0.5);
}

.mine-avatar i {
  font-size: 32px;
  color: #FFFFFF;
}

.mine-user-name {
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.mine-user-phone {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.mine-stats {
  display: flex;
  margin: -20px 16px 0;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 1;
}

.mine-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mine-stat-number {
  font-size: 24px;
  font-weight: 700;
  color: #1E40AF;
  margin-bottom: 4px;
}

.mine-stat-label {
  font-size: 12px;
  color: #64748B;
}

.mine-stat-divider {
  width: 1px;
  height: 40px;
  background: #F1F5F9;
  margin: 4px 0;
}

.mine-menu {
  padding: 24px 16px 0;
}

.mine-menu-title {
  font-size: 16px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 12px;
}

.mine-menu-card {
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mine-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.mine-menu-item:active {
  background: #F8FAFC;
}

.mine-menu-left {
  display: flex;
  align-items: center;
}

.mine-menu-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 18px;
}

.mine-menu-left span {
  font-size: 15px;
  color: #1E293B;
  font-weight: 500;
}

.mine-menu-arrow {
  font-size: 14px;
  color: #D1D5DB;
}

.mine-bottom-menu {
  padding: 16px 16px 0;
}

.mine-bottom-card {
  background: #FFFFFF;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mine-version {
  text-align: center;
  margin-top: 32px;
}

.mine-version p {
  font-size: 12px;
  color: #9CA3AF;
}

/* ========================================
   Business Panel
   ======================================== */

.business-panel {
  min-height: 100vh;
  background: #F8FAFC;
  padding-bottom: 80px;
}

.business-header {
  padding: 16px;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
}

.business-header-title {
  font-size: 28px;
  font-weight: 700;
  color: #1E293B;
}

.business-header-subtitle {
  font-size: 14px;
  color: #64748B;
  margin-top: 4px;
}

.business-hero {
  margin: 8px 16px 0;
  padding: 20px;
  background: #1E40AF;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.business-hero-title {
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.business-hero-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 16px;
}

.business-hero-badges {
  display: flex;
}

.business-hero-badge {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 10px;
  border-radius: 8px;
  margin-right: 10px;
}

.business-hero-badge i {
  font-size: 12px;
  color: #059669;
  margin-right: 4px;
}

.business-hero-badge span {
  font-size: 12px;
  color: #FFFFFF;
  font-weight: 500;
}

.business-hero-badge:nth-child(2) i {
  color: #1E40AF;
}

.business-hero-badge:nth-child(3) i {
  color: #7C3AED;
}

.business-section {
  padding: 24px 16px 0;
}

.business-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 14px;
}

.business-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.business-card {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.business-card:active {
  transform: scale(0.98);
}

.business-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  font-size: 24px;
}

.business-info {
  flex: 1;
}

.business-title {
  font-size: 16px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 2px;
}

.business-subtitle {
  font-size: 13px;
  color: #9CA3AF;
}

.business-arrow {
  color: #D1D5DB;
}

.business-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #FFFFFF;
}

.business-info-section {
  padding: 24px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.business-info-card {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s;
}

.business-info-card:active {
  transform: scale(0.98);
}

.business-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #EFF6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 14px;
  font-size: 20px;
  color: #1E40AF;
}

.business-info-content {
  flex: 1;
}

.business-info-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 2px;
}

.business-info-content p {
  font-size: 13px;
  color: #9CA3AF;
}

.business-info-arrow {
  color: #D1D5DB;
}

/* ========================================
   Page Transitions
   ======================================== */

.page {
  display: none;
}

.page.active {
  display: block;
}

/* ========================================
   Utilities
   ======================================== */

.loading {
  text-align: center;
  padding: 40px;
  color: #64748B;
}

.loading i {
  font-size: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================
   Modal / Alert
   ======================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 320px;
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 12px;
  text-align: center;
}

.modal-content {
  font-size: 14px;
  color: #64748B;
  margin-bottom: 20px;
  text-align: center;
}

.modal-buttons {
  display: flex;
  gap: 12px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-btn.cancel {
  background: #F1F5F9;
  color: #64748B;
}

.modal-btn.confirm {
  background: #1E40AF;
  color: #FFFFFF;
}

.modal-btn:active {
  transform: scale(0.95);
}

/* ========================================
   Responsive
   ======================================== */

@media (min-width: 768px) {
  body {
    max-width: 480px;
    margin: 0 auto;
  }
}
