/* ========================================
   织网 (WebWeave) - 平台管理员后台样式
   ======================================== */

/* === 布局 === */
.platform-admin-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--holy-black);
}

.platform-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background: linear-gradient(145deg, rgba(10, 10, 10, 0.95), rgba(26, 26, 46, 0.9));
  border-bottom: 2px solid var(--sacred-gold);
  box-shadow: var(--holy-glow-soft);
}

.platform-header-left,
.platform-header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.platform-sidebar {
  width: 250px;
  background: linear-gradient(145deg, rgba(10, 10, 10, 0.9), rgba(26, 26, 46, 0.8));
  border-right: 2px solid var(--sacred-gold);
  padding: 20px 0;
  box-shadow: var(--holy-glow-soft);
}

.platform-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 15px;
}

.platform-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  color: var(--holy-white);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--duration-normal);
  border: 2px solid transparent;
}

.platform-nav .nav-item:hover {
  background: rgba(184, 134, 11, 0.2);
  border-color: var(--sacred-gold);
  transform: translateX(5px);
}

.platform-nav .nav-item.active {
  background: linear-gradient(145deg, rgba(184, 134, 11, 0.3), rgba(255, 215, 0, 0.2));
  border-color: var(--divine-gold);
  box-shadow: var(--holy-glow-soft);
}

.platform-nav .nav-item span {
  font-size: 1.2rem;
}

.platform-content {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  background: var(--holy-black);
}

/* === 仪表盘 === */
.platform-dashboard {
  max-width: 1400px;
  margin: 0 auto;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background: linear-gradient(145deg, rgba(10, 10, 10, 0.9), rgba(26, 26, 46, 0.8));
  border: 2px solid var(--sacred-gold);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal);
}

.metric-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--holy-glow-medium);
  border-color: var(--divine-gold);
}

.metric-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: var(--holy-glow-soft);
}

.metric-content {
  flex: 1;
}

.metric-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--divine-gold);
  margin: 0 0 5px 0;
  font-family: var(--font-display);
}

.metric-label {
  color: var(--holy-white);
  margin: 0 0 10px 0;
  font-size: 0.9rem;
}

.metric-detail {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
}

/* === 趋势图表 === */
.trends-section {
  margin-bottom: 40px;
}

.trends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.trend-card {
  padding: 25px;
  background: linear-gradient(145deg, rgba(10, 10, 10, 0.9), rgba(26, 26, 46, 0.8));
  border: 2px solid var(--sacred-gold);
  border-radius: var(--radius-lg);
}

.trend-chart {
  height: 200px;
  margin-top: 15px;
}

/* === 告警 === */
.alerts-section {
  margin-top: 40px;
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.alert-item {
  display: flex;
  align-items: start;
  gap: 15px;
  padding: 20px;
}

.alert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

.alert-item.error {
  border-left: 4px solid var(--error-red);
}

.alert-item.warning {
  border-left: 4px solid var(--warning-orange);
}

.alert-item.info {
  border-left: 4px solid var(--info-blue);
}

/* === 页面头部 === */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--sacred-gold);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* === 表格 === */
.sacred-table {
  width: 100%;
  border-collapse: collapse;
  background: linear-gradient(145deg, rgba(10, 10, 10, 0.9), rgba(26, 26, 46, 0.8));
  border: 2px solid var(--sacred-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.sacred-table thead {
  background: linear-gradient(145deg, rgba(184, 134, 11, 0.3), rgba(255, 215, 0, 0.2));
}

.sacred-table th {
  padding: 15px;
  text-align: left;
  color: var(--divine-gold);
  font-weight: bold;
  font-family: var(--font-display);
  border-bottom: 2px solid var(--sacred-gold);
}

.sacred-table td {
  padding: 15px;
  color: var(--holy-white);
  border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.sacred-table tbody tr:hover {
  background: rgba(184, 134, 11, 0.1);
}

.sacred-table tbody tr:last-child td {
  border-bottom: none;
}

/* === 详情页面 === */
.user-inspect-detail,
.org-inspect-detail {
  max-width: 800px;
}

.detail-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(184, 134, 11, 0.3);
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-item label {
  color: var(--sacred-gold);
  font-size: 0.85rem;
  font-weight: bold;
}

.detail-item span {
  color: var(--holy-white);
}

.orgs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.org-item {
  padding: 20px;
}

.org-item h4 {
  color: var(--divine-gold);
  margin: 0 0 10px 0;
}

.points-display {
  text-align: center;
  padding: 30px;
  background: linear-gradient(145deg, rgba(184, 134, 11, 0.2), rgba(255, 215, 0, 0.1));
  border: 2px solid var(--sacred-gold);
  border-radius: var(--radius-lg);
}

.points-value {
  display: block;
  font-size: 3rem;
  font-weight: bold;
  color: var(--divine-gold);
  font-family: var(--font-display);
  margin-bottom: 10px;
}

.points-label {
  display: block;
  color: var(--holy-white);
  font-size: 1rem;
}

/* === 分页 === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  padding: 20px;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* === 响应式 === */
@media (max-width: 1024px) {
  .platform-admin-layout {
    flex-direction: column;
  }
  
  .platform-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--sacred-gold);
  }
  
  .platform-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .trends-grid {
    grid-template-columns: 1fr;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .platform-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .page-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .page-actions input,
  .page-actions select {
    width: 100% !important;
  }
  
  .sacred-table {
    font-size: 0.85rem;
  }
  
  .sacred-table th,
  .sacred-table td {
    padding: 10px;
  }
}
