/* ============================================
   西安长河通讯有限责任公司新疆分公司 - 全站公共样式
   ============================================ */

/* --- CSS变量 --- */
:root {
  --primary: #1a5fb4;
  --primary-dark: #0d3b7a;
  --primary-light: #3584e4;
  --accent: #e5a50a;
  --bg: #f5f6f8;
  --bg-white: #ffffff;
  --text: #2e3436;
  --text-secondary: #5c6166;
  --text-muted: #9a9fa5;
  --border: #e1e4e8;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
  --transition: 0.2s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

img { max-width: 100%; height: auto; }

/* --- 公共导航栏 --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: rgba(255,255,255,0.98);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.navbar .logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
  letter-spacing: 1px;
}

.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.navbar .nav-links a {
  display: block;
  padding: 8px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

.navbar .nav-links a:hover {
  color: var(--primary);
  background: rgba(26,95,180,0.06);
}

.navbar .nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- 按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 22px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 12px 32px; font-size: 16px; border-radius: 8px; }

.btn-block { display: block; width: 100%; }

/* --- 页面容器 --- */
.page-wrapper {
  padding-top: var(--header-height);
}

/* --- 区块 --- */
.section {
  padding: 80px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 48px;
}

/* --- 卡片 --- */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* --- 页脚 --- */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 48px 40px 24px;
  text-align: center;
  font-size: 14px;
}

.footer a { color: rgba(255,255,255,0.9); }
.footer a:hover { color: #fff; }

.footer .footer-info {
  margin-bottom: 16px;
  line-height: 2;
}

.footer .footer-copy {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* --- 登录卡片 --- */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  padding: 40px;
}

.login-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}

.login-card h2 {
  text-align: center;
  font-size: 22px;
  margin-bottom: 4px;
}

.login-card .login-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* --- 表单 --- */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--bg-white);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,95,180,0.12);
}

/* --- 表格 --- */
.table-wrapper {
  overflow-x: auto;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead { background: #f8f9fb; }

th {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8f9fb; }

/* --- 标签/徽章 --- */
.badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 12px;
}

.badge-success { background: #d3f4e0; color: #1a7f3f; }
.badge-warning { background: #fef0c7; color: #b54708; }
.badge-danger  { background: #fde0e0; color: #b91c1c; }
.badge-info    { background: #dbeafe; color: #1e40af; }

/* --- Toast --- */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: #323840;
  color: #fff;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.toast.show { opacity: 1; }

/* --- 对话框遮罩 --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.4);
  align-items: center;
  justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h3 { font-size: 18px; margin-bottom: 20px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* --- 管理面板布局 --- */
.admin-wrapper {
  min-height: calc(100vh - var(--header-height));
}

.admin-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-white);
  border-bottom: 2px solid var(--border);
  padding: 0 40px;
  overflow-x: auto;
}

.admin-tab {
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}

.admin-tab:hover { color: var(--primary); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.admin-content {
  padding: 24px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

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

.panel-header h2 { font-size: 20px; font-weight: 600; }

/* --- 响应式 --- */
@media (max-width: 768px) {
  .navbar { padding: 0 16px; }
  .navbar .nav-links { display: none; }
  .section { padding: 48px 16px; }
  .section-title { font-size: 24px; }
  .admin-tabs { padding: 0 16px; }
  .admin-content { padding: 16px; }
  .login-card { padding: 24px 20px; }
}
