* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: 'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif; background:#f0f2f5; color:#333; }

/* ===== 登录 ===== */
#loginPage {
  display:flex; align-items:center; justify-content:center; min-height:100vh;
  background:linear-gradient(135deg,#0f2740,#1a3a5c);
}
.login-box {
  background:#fff; border-radius:16px; padding:48px 40px; width:400px; max-width:90vw;
  box-shadow:0 20px 60px rgba(0,0,0,0.3); text-align:center;
}
.login-logo {
  width:64px; height:64px; background:#d4a843; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  font-size:32px; font-weight:800; color:#0f2740; margin:0 auto 16px;
}
.login-box h2 { font-size:22px; color:#1a3a5c; margin-bottom:28px; }
.form-group { margin-bottom:18px; text-align:left; }
.form-group label { display:block; font-size:14px; font-weight:600; color:#555; margin-bottom:6px; }
.form-group label i { width:18px; color:#1a3a5c; }
.form-group input, .form-group select, .form-group textarea {
  width:100%; padding:10px 14px; border:1.5px solid #dde1e6; border-radius:8px;
  font-size:15px; font-family:inherit; transition:all 0.2s; background:#f8f9fa;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline:none; border-color:#1a3a5c; box-shadow:0 0 0 3px rgba(26,58,92,0.1); background:#fff;
}
/* 密码可见切换 */
.pwd-wrap { position:relative; display:flex; align-items:center; }
.pwd-wrap input { padding-right:40px; }
.pwd-toggle {
  position:absolute; right:4px; top:50%; transform:translateY(-50%);
  background:none; border:none; color:#999; cursor:pointer; padding:6px 10px;
  font-size:16px; line-height:1; transition:color 0.2s;
}
.pwd-toggle:hover { color:#1a3a5c; }
.form-group textarea { min-height:100px; resize:vertical; }
.btn {
  display:inline-flex; align-items:center; gap:6px; padding:10px 24px; border:none;
  border-radius:8px; font-size:15px; font-weight:600; cursor:pointer; transition:all 0.2s;
}
.btn-primary { background:#1a3a5c; color:#fff; }
.btn-primary:hover { background:#0f2740; transform:translateY(-1px); }
.btn-danger { background:#e74c3c; color:#fff; }
.btn-danger:hover { background:#c0392b; }
.btn-success { background:#27ae60; color:#fff; }
.btn-success:hover { background:#219a52; }
.btn-sm { padding:6px 14px; font-size:13px; }
.btn-block { width:100%; justify-content:center; padding:12px; }
.login-error { color:#e74c3c; font-size:13px; margin-top:10px; min-height:20px; }

/* ===== 上传区域 ===== */
.upload-area { background:#f8f9fa; border:1px dashed #dde1e6; border-radius:8px; padding:16px; }
.content-img-area { background:#f8f9fa; border:1px dashed #dde1e6; border-radius:8px; padding:16px; }
.upload-btn-wrap { display:flex; align-items:center; }

/* ===== 主布局 ===== */
.admin-header {
  background:#1a3a5c; color:#fff; padding:0 24px; height:56px;
  display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:100;
}
.header-left { display:flex; align-items:center; gap:12px; }
.header-logo { font-size:20px; font-weight:800; color:#d4a843; }
.header-title { font-size:15px; opacity:0.8; }
.header-right { display:flex; align-items:center; gap:16px; font-size:14px; }
.btn-logout { background:rgba(255,255,255,0.12); border:none; color:#fff; padding:6px 14px; border-radius:6px; cursor:pointer; font-size:13px; }
.btn-logout:hover { background:rgba(255,255,255,0.2); }

.admin-body { display:flex; width:100%; min-height:calc(100vh - 56px); }
.sidebar {
  width:200px; background:#fff; border-right:1px solid #e9ecef; padding:12px 0; flex-shrink:0;
}
.nav-item {
  display:flex; align-items:center; gap:10px; padding:12px 20px; color:#555; text-decoration:none;
  font-size:14px; font-weight:500; transition:all 0.2s; border-left:3px solid transparent;
}
.nav-item:hover { background:#f0f4f8; color:#1a3a5c; }
.nav-item.active { background:#f0f4f8; color:#1a3a5c; font-weight:600; border-left-color:#d4a843; }
.nav-item i { width:18px; text-align:center; }

.content { flex:1; padding:24px; overflow-y:auto; }
.page-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:24px; }
.page-header h2 { font-size:22px; color:#1a3a5c; }

/* ===== 卡片 ===== */
.card { background:#fff; border-radius:12px; padding:20px; box-shadow:0 1px 4px rgba(0,0,0,0.06); margin-bottom:20px; }
.stat-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; margin-bottom:24px; }
.stat-card {
  background:#fff; border-radius:12px; padding:20px; box-shadow:0 1px 4px rgba(0,0,0,0.06);
  display:flex; align-items:center; gap:16px;
}
.stat-card .stat-icon {
  width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:22px; color:#fff; flex-shrink:0;
}
.stat-card .stat-num { font-size:28px; font-weight:800; color:#1a3a5c; }
.stat-card .stat-label { font-size:13px; color:#888; margin-top:2px; }

/* ===== 表格 ===== */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th { text-align:left; padding:12px 14px; background:#f8f9fa; color:#555; font-weight:600; border-bottom:2px solid #e9ecef; }
td { padding:10px 14px; border-bottom:1px solid #f0f2f5; vertical-align:top; }
tr:hover td { background:#fafbfc; }
.action-btns { display:flex; gap:6px; }
.badge { display:inline-block; padding:2px 8px; border-radius:4px; font-size:12px; font-weight:600; }
.badge-mainland { background:rgba(26,58,92,0.1); color:#1a3a5c; }
.badge-taiwan { background:rgba(212,168,67,0.15); color:#b8942e; }
.badge-unread { background:#e74c3c; color:#fff; padding:2px 8px; border-radius:10px; font-size:11px; }
.badge-read { background:#95a5a6; color:#fff; padding:2px 8px; border-radius:10px; font-size:11px; }

/* ===== 弹窗 ===== */
.modal {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:1000;
  align-items:center; justify-content:center;
}
.modal.show { display:flex; }
.modal-content {
  background:#fff; border-radius:16px; width:600px; max-width:92vw; max-height:85vh; overflow-y:auto;
  box-shadow:0 20px 60px rgba(0,0,0,0.25);
}
.modal-header { padding:20px 24px; border-bottom:1px solid #e9ecef; display:flex; justify-content:space-between; align-items:center; }
.modal-header h3 { font-size:18px; color:#1a3a5c; }
.modal-close { background:none; border:none; font-size:22px; color:#999; cursor:pointer; }
.modal-close:hover { color:#333; }
.modal-body { padding:24px; }
.modal-footer { padding:16px 24px; border-top:1px solid #e9ecef; display:flex; gap:10px; justify-content:flex-end; }

/* ===== Toast ===== */
.toast {
  position:fixed; bottom:30px; right:30px; background:#1a3a5c; color:#fff; padding:14px 24px;
  border-radius:8px; font-size:14px; opacity:0; transform:translateY(20px);
  transition:all 0.4s ease; z-index:9999; box-shadow:0 8px 24px rgba(0,0,0,0.15);
}
.toast.show { opacity:1; transform:translateY(0); }
.toast.success { background:#27ae60; }
.toast.error { background:#e74c3c; }

/* ===== 响应式 ===== */
@media(max-width:768px) {
  .admin-header { padding:0 8px; height:auto; min-height:44px; flex-wrap:wrap; }
  .header-left .header-title { display:none; }
  .header-right { font-size:12px; gap:8px; }
  .header-right span { display:none; }
  
  .admin-body { flex-direction:column; }
  
  .sidebar {
    width:100%; padding:0; display:flex; overflow-x:auto;
    border-right:none; border-bottom:1px solid #e9ecef;
    flex-wrap:nowrap; -webkit-overflow-scrolling:touch;
    background:#f8f9fa;
  }
  .nav-item {
    flex-shrink:0; padding:10px 14px; font-size:12px; white-space:nowrap;
    border-left:none; border-bottom:2px solid transparent;
    justify-content:center; gap:4px;
  }
  .nav-item.active { border-left-color:transparent; border-bottom-color:#d4a843; }
  .nav-item i { font-size:14px; }
  
  .content { padding:8px; min-height:0; }
  .page-header { flex-direction:column; align-items:flex-start; gap:6px; }
  .page-header h2 { font-size:16px; margin-bottom:0; }
  .stat-cards { grid-template-columns:repeat(2,1fr); gap:6px; }
  .stat-card { padding:10px; gap:8px; }
  .stat-card .stat-num { font-size:18px; }
  .stat-card .stat-icon { width:32px; height:32px; font-size:14px; }
  .card { padding:8px; border-radius:6px; margin-bottom:10px; }
  .table-wrap { margin:0 -8px; }
  table { font-size:12px; }
  th, td { padding:4px 6px; }
  .action-btns { flex-wrap:wrap; gap:3px; }
  .btn-sm { padding:4px 10px; font-size:11px; }
  .modal-content { width:100%; max-width:100vw; max-height:100vh; border-radius:0; }
  .toast { left:8px; right:8px; bottom:8px; text-align:center; font-size:12px; padding:10px 16px; }
  .cockpit-wrap{height:calc(100vh - 44px)} .cockpit-frame{height:100%;width:100%}
}


/* ===== 拖拽排序 ===== */
.sortable-ghost { opacity:0.4; background:#f0f4ff !important; }
.sortable-chosen { background:#f8f9ff; }
.sortable-drag { opacity:0.8; }
.sort-handle { cursor:grab; color:#999; padding:4px; font-size:14px; }
.sort-handle:hover { color:#1a3a5c; }
.sort-handle:active { cursor:grabbing; }

/* ===== Token 过期提示 ===== */
.token-warning {
  position:fixed; top:0; left:0; right:0;
  background:#f39c12; color:#fff; padding:10px 20px;
  text-align:center; font-size:14px; z-index:9999;
  display:flex; align-items:center; justify-content:center; gap:12px;
}

/* ===== 数据驾驶舱 ===== */
.cockpit-wrap{width:100%;height:calc(100vh - 56px);overflow:hidden;display:flex}
.cockpit-frame{width:100%;height:100%;border:none;background:#0a1628;display:block}
.content{flex:1;overflow:auto;min-height:calc(100vh - 56px)}
