/* ============================================================
   Eurofins Assurance & Inspection — 主样式
   色板参考 eurofins.com：主蓝 / 深蓝 / 浅蓝灰背景 / 强调青蓝
   ============================================================ */

:root {
  --euro-blue:        #00539B;
  --euro-blue-dark:   #003A6D;
  --euro-blue-light:  #EAF3FB;
  --bg-light:         #F3F7FB;
  --card-border:      #E1E8F0;
  --accent:           #00A0C8;
  --success:          #2E9E4F;
  --warning:          #E8A33D;
  --danger:           #D64545;
  --text-main:        #1F2A37;
  --text-muted:       #66788A;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text-main);
  background: var(--bg-light);
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--euro-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: "Consolas", "Menlo", monospace; font-size: 13px; }

/* ---------- 顶部蓝条 ---------- */
.topbar { height: 4px; background: var(--euro-blue); }

/* ---------- 头部导航 ---------- */
.site-header, .admin-header { background: #fff; border-bottom: 1px solid var(--card-border); }
.header-inner, .admin-header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }

.brand { display: flex; flex-direction: column; line-height: 1.15; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 26px; width: auto; margin-bottom: 3px; }
.brand-sub { font-size: 11px; color: var(--text-muted); letter-spacing: .5px; }

.main-nav, .admin-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.main-nav a, .admin-nav a { color: var(--text-main); font-weight: 500; padding: 4px 0; }
.main-nav a:hover, .admin-nav a:hover, .main-nav a.active, .admin-nav a.active { color: var(--euro-blue); text-decoration: none; }
.main-nav a.active, .admin-nav a.active { border-bottom: 3px solid var(--euro-blue); }
.nav-user { color: var(--text-muted); font-size: 13px; }

/* 相关信息下拉 */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-trigger { cursor: pointer; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0,0,0,.1); min-width: 200px; padding: 8px 0; z-index: 20; }
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 8px 16px; font-weight: 400; }
.dropdown-menu a:hover { background: var(--euro-blue-light); text-decoration: none; }

/* 语言切换 */
.lang-switch { font-size: 13px; white-space: nowrap; }
.lang-switch a { color: var(--text-muted); padding: 4px 6px; }
.lang-switch a:hover { color: var(--euro-blue); text-decoration: none; }
.lang-current { font-weight: 700; color: var(--euro-blue); padding: 4px 6px; }

/* ---------- Flash 消息 ---------- */
.flash-area { margin-top: 16px; }
.flash { padding: 10px 16px; border-radius: var(--radius); margin-bottom: 8px; font-size: 14px; }
.flash-success { background: #E8F5EC; color: var(--success); border: 1px solid #C6E6D2; }
.flash-danger  { background: #FDECEC; color: var(--danger); border: 1px solid #F3C6C6; }
.flash-warning { background: #FDF6E3; color: #A97A1F; border: 1px solid #F0E0B8; }

/* ---------- Hero + 查询 ---------- */
.hero { background: linear-gradient(180deg, var(--euro-blue-light) 0%, var(--bg-light) 100%); padding: 64px 0 88px; }
.hero-inner { text-align: center; }
.hero h1 { font-size: 34px; color: var(--euro-blue-dark); margin: 0 0 14px; }
.hero-subtitle { max-width: 720px; margin: 0 auto 28px; color: var(--text-muted); font-size: 15px; }

.search-card { background: #fff; border: 1px solid var(--card-border); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 41, 90, .08); padding: 20px; max-width: 860px; margin: 0 auto; text-align: left; }
.search-card-compact { margin: 20px 0 8px; }

.search-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.search-field { flex: 1; min-width: 180px; }
.search-field label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }
.search-field input { width: 100%; padding: 10px 12px; border: 1px solid var(--card-border); border-radius: var(--radius); font-size: 14px; }
.search-field input:focus { outline: none; border-color: var(--euro-blue); box-shadow: 0 0 0 3px rgba(0, 83, 155, .12); }
.btn-search { padding: 10px 24px; }

/* 验证码弹出框 */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-mask[hidden] { display: none; }
.modal { background: #fff; border-radius: 10px; box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
  width: 320px; max-width: 100%; padding: 24px; }
.modal-title { font-size: 18px; color: var(--euro-blue-dark); margin: 0 0 8px; }
.modal-desc { font-size: 13px; color: var(--text-muted); margin: 0 0 16px; }
.modal-captcha { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.captcha-img { height: auto; width: 140px; object-fit: contain; border: 1px solid var(--card-border);
  border-radius: var(--radius); cursor: pointer; }
.captcha-refresh { font-size: 12px; color: var(--euro-blue); white-space: nowrap; }
.modal input { width: 100%; padding: 10px 12px; border: 1px solid var(--card-border);
  border-radius: var(--radius); font-size: 14px; box-sizing: border-box; }
.modal input:focus { outline: none; border-color: var(--euro-blue); box-shadow: 0 0 0 3px rgba(0, 83, 155, .12); }
.modal-error { color: var(--danger); font-weight: 600; font-size: 13px; margin: 10px 0 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ---------- 按钮 ---------- */
.btn { display: inline-block; padding: 10px 18px; border-radius: var(--radius); border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--euro-blue); color: #fff; }
.btn-primary:hover { background: var(--euro-blue-dark); }
.btn-outline { background: #fff; border-color: var(--euro-blue); color: var(--euro-blue); }
.btn-outline:hover { background: var(--euro-blue-light); }
.btn-danger { background: #fff; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: #FDECEC; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-search { min-width: 120px; }

/* ---------- 通用区块 ---------- */
.section { margin: 40px auto; }
.section-title { font-size: 26px; color: var(--euro-blue-dark); text-align: center; margin: 0 0 24px; }
.page-title { font-size: 24px; color: var(--euro-blue-dark); margin: 20px 0 16px; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.card { background: #fff; border: 1px solid var(--card-border); border-radius: 8px; box-shadow: var(--shadow); padding: 22px; }
.card h3 { margin: 0 0 8px; color: var(--euro-blue-dark); font-size: 17px; }
.card p { color: var(--text-muted); font-size: 14px; margin: 0 0 12px; }
.card-link { font-weight: 600; font-size: 14px; }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding: 14px 0; font-size: 13px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--euro-blue); }
.breadcrumb span { color: var(--text-main); font-weight: 600; }

/* ---------- 表格 ---------- */
.table-wrap { background: #fff; border: 1px solid var(--card-border); border-radius: 8px; overflow-x: auto; box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #EFF3F8; vertical-align: middle; }
.data-table th { background: #F8FAFC; color: var(--text-muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFCFE; }
.detail-table th { width: 180px; }
.company-zh { font-weight: 600; }
.company-en { color: var(--text-muted); font-size: 13px; }
.row-actions { white-space: nowrap; }
.row-actions .inline-form, .inline-form { display: inline; }
.empty-cell { text-align: center; color: var(--text-muted); padding: 30px 0 !important; }

/* ---------- 状态徽章 ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; }
.badge-valid      { background: var(--success); }
.badge-expired    { background: var(--warning); }
.badge-suspended  { background: var(--danger); }
.badge-revoked    { background: #6F42C1; }
.badge-cancelled  { background: #495057; }
.badge-published  { background: var(--euro-blue); }
.badge-draft      { background: #9AA8B5; }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 18px 0; }
.pagination a { border: 1px solid var(--card-border); background: #fff; padding: 6px 14px; border-radius: var(--radius); }
.pagination span { color: var(--text-muted); }

/* ---------- 验证横幅 ---------- */
.verify-banner { border-radius: 8px; padding: 16px 20px; font-size: 16px; margin: 8px 0 20px; display: flex; align-items: center; gap: 10px; }
.verify-valid     { background: #E8F5EC; border: 1px solid #C6E6D2; color: var(--success); }
.verify-expired   { background: #FDF6E3; border: 1px solid #F0E0B8; color: #A97A1F; }
.verify-suspended { background: #FDECEC; border: 1px solid #F3C6C6; color: var(--danger); }
.verify-icon { font-size: 20px; font-weight: 800; }

.back-link { margin-top: 20px; }
.result-count { color: var(--text-muted); font-size: 14px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); background: #fff; border: 1px dashed var(--card-border); border-radius: 8px; }
.empty-state h2 { color: var(--text-main); margin-bottom: 8px; }

/* ---------- 静态页面正文 ---------- */
.page-article { background: #fff; border: 1px solid var(--card-border); border-radius: 8px; padding: 32px 36px; box-shadow: var(--shadow); }
.page-content p { margin: 0 0 14px; }
.page-content img { max-width: 100%; height: auto; border-radius: 6px; margin: 6px 0; }
.page-content a { color: var(--euro-blue); }
.page-content h1, .page-content h2, .page-content h3 { margin: 18px 0 8px; }
.page-content table { border-collapse: collapse; margin: 14px 0; }
.page-content th, .page-content td { border: 1px solid #dfe3e8; padding: 6px 10px; font-size: 14px; }
.page-content blockquote { border-left: 3px solid var(--euro-blue); padding-left: 12px; color: #555; margin: 12px 0; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--euro-blue-dark); color: #DCE6F2; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding: 40px 20px; }
.footer-col h4 { color: #fff; font-size: 15px; margin: 0 0 12px; }
.footer-col p, .footer-col ul { font-size: 13px; margin: 0; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #DCE6F2; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 14px 0; font-size: 12px; }
.footer-icp { margin-top: 8px; line-height: 1.8; opacity: .75; }
.footer-icp-beian a { color: inherit; text-decoration: none; }
.footer-icp-beian a:hover { text-decoration: underline; }

/* ---------- 登录页 ---------- */
.login-wrap { padding: 48px 0; display: flex; justify-content: center; }
.login-card { background: #fff; border: 1px solid var(--card-border); border-radius: 8px; box-shadow: var(--shadow);
  padding: 32px; width: 380px; }
.login-card h2 { color: var(--euro-blue-dark); margin: 0 0 20px; }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 5px; }
.form-group small { color: var(--text-muted); font-size: 12px; }
.form-control { width: 100%; padding: 9px 12px; border: 1px solid var(--card-border); border-radius: var(--radius); font-size: 14px; font-family: inherit; }
.form-control:focus { outline: none; border-color: var(--euro-blue); box-shadow: 0 0 0 3px rgba(0, 83, 155, .12); }
.form-control-file { margin: 8px 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-group-full { grid-column: 1 / -1; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input { width: auto; }
.form-check label { margin: 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .header-inner, .admin-header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .main-nav, .admin-nav { order: 3; width: 100%; justify-content: flex-start; }
  .search-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
}
