/* ============================================================
   企业名片网 · 还原老站视觉与排版
   设计基准：原 images/STYLE.css + index.asp
   - 宋体 12px / 行高 20px
   - 定宽居中 1000px
   - 浅蓝渐变标题栏 + 蓝色粗体标题 #29458c
   - 黑字、悬停红色 #FF0000 下划线
   - 1px 灰边框白底盒子
   - 名片卡：橙角 + 橙蓝底边（还原 1b.gif）
   ============================================================ */

:root {
  --blue: #29458c;        /* 标题/品牌蓝 */
  --blue-link: #0058b0;   /* 名称链接蓝 */
  --orange: #f7821e;      /* 名片橙角 */
  --card-blue: #1f56a8;   /* 名片底蓝条 */
  --hover: #FF0000;       /* 悬停红 */
  --border: #cccccc;      /* 盒子边框灰 */
  --border-soft: #d8dde5; /* 盒子外框浅灰蓝 */
  --grid-bg: #f0f0f0;     /* 行业网格分隔底 */
  --text: #333333;
  --gray: #999999;
  --titlebar: linear-gradient(#eef5fc, #dcebf8); /* 还原浅蓝渐变标题栏 */
}

* { margin: 0; padding: 0; box-sizing: border-box; list-style: none; }
html, body { height: 100%; }
body {
  font-family: "宋体", SimSun, "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 20px;
  color: var(--text);
  background: #f3f3f3;
}
img { border: none; max-width: 100%; vertical-align: middle; }

a { color: #333333; text-decoration: none; }
a:visited { color: #020202; }
a:hover { color: var(--hover); text-decoration: underline; }
a:active { color: #00518a; }

/* 流式容器：始终占满屏幕宽度 */
.wrap { width: 100%; margin: 0 auto; background: #fff; }

/* ===== 顶部：logo + 申请名片/会员登陆 + 数据库统计 ===== */
.topbar { background: #fff; }
.topbar-in { width: 100%; margin: 0 auto; height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.topbar .logo img { height: 49px; }
.topbar .logo-txt { display: none; }
.topbar-right { text-align: right; color: #666; line-height: 22px; }
.topbar-right .ops a { color: var(--blue); font-weight: bold; }
.topbar-right .ops a:hover { color: var(--hover); }
.topbar-right .count { color: #666; }
.topbar-right .count b { color: #c00; font-family: Arial; font-size: 14px; padding: 0 2px; }

/* ===== 主导航条：浅蓝渐变，居中文字链接，| 分隔 ===== */
.nav {
  min-height: 33px; line-height: 33px;   /* 换行时自动增高，避免溢出重叠 */
  background: linear-gradient(#5b9bd5, #2f6db0);
  border-top: 1px solid #1f5b9e;
  text-align: center;
}
.nav-in { width: 100%; margin: 0 auto; padding: 0 24px; }
.nav a { color: #fff; font-size: 14px; padding: 0 14px; display: inline-block; }
.nav a:hover { color: #ffe; text-decoration: none; background: rgba(255,255,255,.12); }
.nav a.active { background: rgba(0,0,0,.12); font-weight: bold; }
.nav .sep { color: #cfe0f2; }

/* ===== 内容区 ===== */
.main { width: 100%; margin: 0 auto; background: #fff; padding: 12px 24px; overflow: hidden; }
.col-left { width: 245px; float: left; }
.col-main { width: calc(100% - 260px); float: right; }
.clear { clear: both; }

/* ===== 盒子（左栏小盒 + 主栏分区）：1px 灰边框白底 ===== */
.box { border: 1px solid var(--border); background: #fff; margin-bottom: 10px; }
.box-hd {
  height: 28px; line-height: 28px;
  background: var(--titlebar);
  border-bottom: 1px solid #c4d8ec;
  padding: 0 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.box-hd .t { color: var(--blue); font-weight: bold; font-size: 14px; }
.box-hd .desc { color: var(--gray); font-weight: normal; font-size: 12px; margin-left: 8px; flex: 1; }
.box-hd .more a { color: #666; font-weight: normal; font-size: 12px; }
.box-hd .more a:hover { color: var(--hover); }
.box-bd { padding: 8px 10px; }

/* ===== 左栏文字列表 ===== */
.txt-list li { line-height: 24px; border-bottom: 1px dashed #ddd; padding-left: 12px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txt-list li:last-child { border-bottom: none; }
.txt-list li::before { content: '·'; position: absolute; left: 2px; color: var(--blue); }
.txt-list li .date { float: right; color: var(--gray); padding-left: 6px; }

/* ===== 登录/入口小盒 ===== */
.login-box .box-bd { padding: 10px; }
.fld { display: flex; align-items: center; margin-bottom: 8px; }
.fld label { width: 48px; color: #555; }
.fld input { flex: 1; height: 24px; border: 1px solid var(--border); padding: 0 6px; font-size: 12px; }
.btn { display: inline-block; height: 26px; line-height: 26px; padding: 0 16px; background: linear-gradient(#5b9bd5, #2f6db0); color: #fff; border: 1px solid #2f6db0; cursor: pointer; font-size: 12px; text-align: center; }
.btn:hover { color: #fff; text-decoration: none; background: linear-gradient(#6aa6db, #356fb3); }
.btn-org { background: linear-gradient(#ffa64d, #f7821e); border-color: #e0700f; }
.btn-org:hover { background: linear-gradient(#ffb366, #f98f2e); }
.btn-lg { height: 30px; line-height: 30px; padding: 0 22px; font-size: 13px; }
.login-links { margin-top: 6px; color: #777; text-align: center; }
.login-links a { color: var(--blue); }

/* ===== 企业查询框 ===== */
.search-box .box-bd { padding: 16px 12px; }
.search-form { display: flex; gap: 0; }
.search-form input[type=text] { flex: 1; height: 30px; border: 1px solid #7ba7d6; border-right: none; padding: 0 10px; font-size: 13px; }
.search-form button { height: 30px; border: none; background: linear-gradient(#5b9bd5, #2f6db0); color: #fff; padding: 0 24px; font-size: 14px; cursor: pointer; }
.search-form button:hover { background: linear-gradient(#6aa6db, #356fb3); }
.search-tip { margin-top: 8px; color: #888; }
.search-tip a { color: var(--blue-link); }

/* ===== 企业中心（dashboard）===== */
.side-menu a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line, #eef1f5); color: var(--text); }
.side-menu a:last-child { border-bottom: none; }
.side-menu a:hover { background: #f6f9fd; color: var(--blue); padding-left: 18px; text-decoration: none; }
.side-menu a.on { background: var(--blue); color: #fff; font-weight: bold; }
.side-menu a.on:hover { color: #fff; padding-left: 14px; }
.dash-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.dash-stats .s { flex: 1; min-width: 120px; background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--blue); text-align: center; padding: 16px 8px; }
.dash-stats .s .n { font-size: 24px; font-weight: bold; color: var(--blue); font-family: Arial, "宋体"; }
.dash-stats .s .t { color: var(--gray); font-size: 12px; margin-top: 4px; }
.badge-st { display: inline-block; padding: 1px 9px; border-radius: 3px; font-size: 12px; color: #fff; }
.badge-st.ok { background: #2c9c63; } .badge-st.wait { background: var(--orange); } .badge-st.no { background: #c0392b; }
/* 资料表单：两列栅格 */
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px){ .form-grid2 { grid-template-columns: 1fr; } }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* ===== 最新注册企业名片：直接用原站 1b.gif（280×153）作边框背景 ===== */
/* 名片栅格：固定卡宽 280（保证 1b.gif 边框不变形），按屏宽自动每行多排、铺满 */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, 280px); justify-content: space-between; gap: 14px; }
.mp-card {
  width: 280px; height: 153px;
  background: url(/static/images/1b.gif) no-repeat left top;
  padding: 12px 18px 14px 30px;   /* 左侧让出折角，右/下让出边框 */
  overflow: hidden;
}
.mp-card .name { height: 26px; line-height: 24px; font-weight: bold; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mp-card .name a { color: var(--blue); font-size: 13px; }
.mp-card .name a:hover { color: var(--hover); }
.mp-card .divider { height: 1px; background: url(/static/images/mpbj.gif) repeat-x left center; margin: 0 0 6px; }
.mp-card .row { color: #333; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-card .row a { color: var(--blue-link); }
.mp-card .row a:hover { color: var(--hover); }

/* ===== 行业分区：企业链接网格，按屏宽自动增减列数 ===== */
.ind-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); background: var(--grid-bg); border: 1px solid #e3e3e3; gap: 1px; }
.ind-grid a {
  line-height: 26px; padding: 0 8px; background: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333;
}
.ind-grid a:hover { color: var(--hover); text-decoration: none; background: #fafcff; }

/* ===== 企业名录列表页 ===== */
.crumb { padding: 8px 2px; color: #888; }
.crumb a { color: #555; }
.filter-bar { border: 1px solid var(--border); background: #fff; margin-bottom: 10px; }
.filter-row { display: flex; border-bottom: 1px dashed #eee; padding: 8px 10px; line-height: 24px; }
.filter-row:last-child { border-bottom: none; }
.filter-row .k { width: 60px; color: var(--blue); font-weight: bold; flex-shrink: 0; }
.filter-row .v { flex: 1; }
.filter-row .v a { display: inline-block; padding: 0 9px; color: #444; }
.filter-row .v a:hover, .filter-row .v a.on { color: var(--hover); }
.filter-row .v a.on { font-weight: bold; }
.result-info { padding: 8px 2px; color: #666; }
.result-info b { color: #c00; font-family: Arial; padding: 0 2px; }

/* ===== 分页 ===== */
.pager { text-align: center; padding: 16px 0; }
.pager a, .pager span { display: inline-block; min-width: 26px; height: 26px; line-height: 26px; padding: 0 8px; border: 1px solid var(--border); background: #fff; margin: 0 2px; color: #333; }
.pager a:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.pager .cur { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ===== 企业详情 ===== */
.detail-title { font-size: 18px; color: var(--blue); font-weight: bold; padding: 6px 0; }
.info-tb { width: 100%; border-collapse: collapse; border: 1px solid var(--border); }
.info-tb th, .info-tb td { border: 1px solid #e2e2e2; padding: 8px 10px; text-align: left; line-height: 20px; vertical-align: top; }
.info-tb th { width: 90px; background: #f6f9fd; color: #555; font-weight: normal; white-space: nowrap; }
.intro { padding: 10px; line-height: 22px; color: #444; }

/* ===== 表单/认证/会员页通用 ===== */
.form-box { max-width: 420px; margin: 20px auto; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; margin-bottom: 4px; color: #555; }
.form-row input, .form-row select, .form-row textarea { width: 100%; height: 30px; border: 1px solid var(--border); padding: 0 8px; font-size: 13px; font-family: inherit; }
.form-row textarea { height: auto; min-height: 90px; padding: 8px; line-height: 20px; }
.alert { padding: 8px 12px; margin-bottom: 12px; border: 1px solid; }
.alert.err { background: #fff3f3; border-color: #f0c0c0; color: #c0392b; }
.alert.ok { background: #f0fbf3; border-color: #bfe3cb; color: #1f8a4c; }
.alert.info { background: #eef5fc; border-color: #c4d8ec; color: var(--blue); }

/* ===== 会员套餐价格卡 ===== */
.price-grid { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0; }
.price-card { flex: 1; min-width: 200px; border: 1px solid var(--border); background: #fff; text-align: center; }
.price-card .ph { background: var(--titlebar); border-bottom: 1px solid #c4d8ec; padding: 10px; color: var(--blue); font-weight: bold; font-size: 15px; }
.price-card.hot .ph { background: linear-gradient(#ffa64d, #f7821e); color: #fff; }
.price-card .pp { font-size: 26px; color: #c00; font-family: Arial; padding: 14px 0 4px; }
.price-card .pp small { font-size: 12px; color: #999; }
.price-card ul { padding: 10px 16px; text-align: left; }
.price-card ul li { line-height: 26px; border-bottom: 1px dashed #eee; color: #555; }
.price-card .pf { padding: 12px; }

/* ===== 页脚 ===== */
.foot { width: 100%; margin: 10px auto 0; background: #fff; border-top: 2px solid var(--blue); padding: 14px 24px 22px; text-align: center; color: #888; line-height: 22px; }
.foot a { color: #666; }
.foot a:hover { color: var(--hover); }
.foot .links { padding-bottom: 8px; }
.foot .links a { padding: 0 8px; border-right: 1px solid #ddd; }
.foot .links a:last-child { border-right: none; }

/* ===== 响应式：整站流式，窄屏折叠为单列 ===== */
@media (max-width: 820px) {
  /* 左右两栏在窄屏堆叠为单列 */
  .col-left, .col-main { width: 100% !important; float: none !important; margin-left: 0; }
  .col-left { margin-bottom: 10px; }
  .card-grid { justify-content: center; }   /* 单/双列时居中更匀称 */
}
@media (max-width: 640px) {
  .topbar-in { height: auto; flex-direction: column; gap: 6px; padding: 8px 12px; }
  .topbar-right { text-align: center; }
  .nav { height: auto; line-height: 30px; padding: 4px 0; }
  .nav-in { padding: 0 8px; }
  .nav a { padding: 0 8px; }
  .nav .sep { display: none; }
  .main { padding: 10px 12px; }
  .price-grid { flex-direction: column; }
}
@media (max-width: 360px) {
  /* 极窄屏：名片卡缩放填满（轻微等比缩放边框图） */
  .card-grid { grid-template-columns: 1fr; }
  .mp-card { width: 100%; background-size: 100% 100%; height: auto; min-height: 150px; }
}
