﻿/* ============================================
   企业廉正合规举报平台 - 自定义样式
   主题色：红色基调 #ea580c / #f97316
   ============================================ */

:root {
  --red-primary: #ea580c;
  --red-dark: #a00;
  --red-hover: #f97316;
  --red-light: #fce4e4;
  --red-bg-light: #fff5f5;
  --gray-100: #f8f9fa;
  --gray-200: #eee;
  --gray-300: #ddd;
  --gray-400: #ccc;
  --gray-500: #999;
  --gray-600: #666;
  --gray-700: #555;
  --gray-800: #333;
  --gray-900: #222;
  --white: #fff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  --radius: 8px;
  --radius-lg: 12px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* ============ 全局 ============ */
* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  color: var(--gray-800);
  background: #f5f5f5;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--red-primary); text-decoration: none; }
a:hover { color: var(--red-dark); text-decoration: underline; }

/* ============ 头部 ============ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1030;
}
.site-header .navbar-brand {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: .5px;
}
.site-header .navbar-brand .brand-accent {
  color: var(--red-primary);
}
.site-header .nav-link {
  color: var(--gray-700) !important;
  font-size: .92rem;
  padding: .5rem .85rem !important;
  border-radius: 4px;
  transition: all .2s;
}
.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: var(--red-primary) !important;
  background: var(--red-bg-light);
}

/* ============ Hero 区域 ============ */
.hero-section {
  background: linear-gradient(135deg, var(--red-primary) 0%, #8b0000 100%);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}
.hero-section h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: .6rem;
  letter-spacing: 1px;
}
.hero-section .hero-sub {
  font-size: 1rem;
  opacity: .9;
  max-width: 680px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero-section { padding: 4rem 0; }
  .hero-section h1 { font-size: 2.4rem; }
  .hero-section .hero-sub { font-size: 1.1rem; }
}

/* ============ 主容器 ============ */
.main-wrap {
  flex: 1;
  padding: 2rem 0 3rem;
}

/* ============ 卡片 ============ */
.card-report {
  background: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-report:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.card-report .card-header {
  background: transparent;
  border-bottom: 3px solid var(--red-primary);
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}
.card-report .card-body { padding: 1.5rem; }
.card-report .card-footer {
  background: transparent;
  border-top: 1px solid var(--gray-200);
  padding: 1rem 1.5rem;
}

/* 两栏布局 */
.two-col-layout .col-item {
  margin-bottom: 1.5rem;
}
@media (min-width: 992px) {
  .two-col-layout .col-item {
    margin-bottom: 0;
  }
}

/* ============ 违规列表 ============ */
.violation-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.violation-list li {
  position: relative;
  padding: .4rem 0 .4rem 1.4rem;
  font-size: .92rem;
  color: var(--gray-700);
  line-height: 1.5;
}
.violation-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .7rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-primary);
}

/* ============ 承诺条款 ============ */
.commitment-box {
  background: var(--red-bg-light);
  border-left: 4px solid var(--red-primary);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 1rem 0 0;
  font-size: .88rem;
}
.commitment-box .commitment-title {
  font-weight: 600;
  color: var(--red-primary);
  margin-bottom: .4rem;
}
.commitment-box p { margin-bottom: .25rem; color: var(--gray-700); }
.commitment-box .highlight { color: var(--red-primary); font-weight: 600; }

/* ============ 按钮 ============ */
.btn-red {
  background: var(--red-primary);
  border-color: var(--red-primary);
  color: var(--white);
  font-weight: 600;
  padding: .65rem 1.5rem;
  border-radius: 6px;
  transition: all .2s;
}
.btn-red:hover, .btn-red:focus {
  background: var(--red-hover);
  border-color: var(--red-hover);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(204,0,0,.3);
}
.btn-red-lg {
  padding: .85rem 2rem;
  font-size: 1.05rem;
  border-radius: 8px;
  font-weight: 700;
}
.btn-outline-red {
  color: var(--red-primary);
  border: 2px solid var(--red-primary);
  background: transparent;
  font-weight: 600;
  border-radius: 6px;
  padding: .5rem 1.2rem;
  transition: all .2s;
}
.btn-outline-red:hover {
  background: var(--red-primary);
  color: var(--white);
}
.btn-gray {
  background: var(--gray-200);
  border-color: var(--gray-300);
  color: var(--gray-700);
  font-weight: 500;
  border-radius: 6px;
  padding: .5rem 1.2rem;
  transition: all .2s;
}
.btn-gray:hover {
  background: var(--gray-300);
  color: var(--gray-900);
}

/* ============ 底部 ============ */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-500);
  padding: 1.8rem 0;
  font-size: .88rem;
  margin-top: auto;
}
.site-footer a {
  color: var(--gray-400);
}
.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}
.site-footer .footer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 .5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 1.5rem;
}
.site-footer .footer-links li {
  display: inline-block;
}
.site-footer .footer-divider {
  color: var(--gray-600);
  margin: 0 .5rem;
}
.site-footer .copyright {
  text-align: center;
  margin-top: .6rem;
}

/* ============ 表单 ============ */
.form-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 2rem;
}
.form-section .form-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  border-bottom: 3px solid var(--red-primary);
  padding-bottom: .75rem;
  margin-bottom: 1.5rem;
}
.form-label {
  font-weight: 600;
  color: var(--gray-800);
  font-size: .92rem;
  margin-bottom: .3rem;
}
.form-label .required { color: var(--red-primary); margin-left: 2px; }
.form-control, .form-select {
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: .5rem .75rem;
  font-size: .92rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--red-primary);
  box-shadow: 0 0 0 3px rgba(204,0,0,.15);
}
.form-control.is-invalid, .form-select.is-invalid {
  border-color: #dc3545;
  box-shadow: none;
}
.invalid-feedback {
  font-size: .82rem;
  color: #dc3545;
  margin-top: .25rem;
}
textarea.form-control { min-height: 120px; resize: vertical; }

/* 单选框行内 */
.radio-inline-group {
  display: flex;
  gap: 1.5rem;
  padding-top: .3rem;
}
.radio-inline-group .form-check { padding-left: 1.5rem; }
.radio-inline-group .form-check-input {
  margin-left: -1.5rem;
  margin-top: .3rem;
}
.radio-inline-group .form-check-input:checked {
  background-color: var(--red-primary);
  border-color: var(--red-primary);
}

/* 复选框 */
.form-check-input:checked {
  background-color: var(--red-primary);
  border-color: var(--red-primary);
}

/* ============ 文件上传 ============ */
.file-upload-area {
  border: 2px dashed var(--gray-400);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--gray-100);
}
.file-upload-area:hover {
  border-color: var(--red-primary);
  background: var(--red-bg-light);
}
.file-upload-area.dragover {
  border-color: var(--red-primary);
  background: var(--red-light);
}
.file-upload-area .upload-icon {
  font-size: 2rem;
  color: var(--gray-500);
  margin-bottom: .4rem;
}
.file-upload-area .upload-text {
  font-size: .9rem;
  color: var(--gray-600);
}
.file-upload-area .upload-hint {
  font-size: .78rem;
  color: var(--gray-500);
  margin-top: .2rem;
}
.file-list { margin-top: .8rem; }
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: .45rem .75rem;
  margin-bottom: .4rem;
  font-size: .88rem;
}
.file-item .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: .5rem;
}
.file-item .file-size {
  color: var(--gray-500);
  font-size: .8rem;
  margin-right: .5rem;
  white-space: nowrap;
}
.file-item .file-status {
  color: var(--gray-500);
  font-size: .8rem;
  margin-right: .5rem;
  white-space: nowrap;
}
.file-item .file-status.success { color: #28a745; }
.file-item .file-status.error { color: #dc3545; }
.file-item .file-remove {
  color: var(--gray-500);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 .2rem;
}
.file-item .file-remove:hover { color: #dc3545; }

/* ============ 进度查询 ============ */
.query-card {
  max-width: 720px;
  margin: 0 auto;
}
.query-result-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.8rem;
  margin-top: 1.5rem;
}
.query-result-card .qr-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--gray-200);
}
.query-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .6rem 1.5rem;
}
@media (min-width: 576px) {
  .query-info-grid { grid-template-columns: 1fr 1fr; }
}
.query-info-grid .qig-item {}
.qig-label {
  font-size: .82rem;
  color: var(--gray-500);
  margin-bottom: .1rem;
}
.qig-value {
  font-size: .95rem;
  color: var(--gray-800);
  font-weight: 500;
}
.status-badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-verifying { background: #cce5ff; color: #004085; }
.status-closed { background: #d4edda; color: #155724; }
.status-invalid { background: #e2e3e5; color: #383d41; }

/* ============ 加载动画 ============ */
.spinner-red { color: var(--red-primary); }
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  display: none;
}

/* ============ 提示 Toast ============ */
.toast-container-custom {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9998;
}

/* ============ 隐私协议弹窗 ============ */
.privacy-modal .modal-header {
  background: var(--red-primary);
  color: var(--white);
}
.privacy-modal .modal-header .btn-close {
  filter: brightness(0) invert(1);
}

/* ============ 响应式 ============ */
@media (max-width: 767.98px) {
  .hero-section { padding: 2rem 0; }
  .hero-section h1 { font-size: 1.5rem; }
  .hero-section .hero-sub { font-size: .92rem; }
  .form-section { padding: 1.2rem; }
  .card-report .card-header { padding: 1rem 1.2rem; font-size: 1rem; }
  .card-report .card-body { padding: 1.2rem; }
  .site-header .navbar-brand { font-size: 1rem; }
  .radio-inline-group { flex-wrap: wrap; gap: .5rem; }
  .btn-red-lg { width: 100%; }
  .two-col-layout .btn-red-lg { font-size: .95rem; padding: .75rem 1rem; }
  .site-footer .footer-links { flex-direction: column; align-items: center; gap: .25rem; }
  .site-footer .footer-divider { display: none; }
}

@media (max-width: 575.98px) {
  .form-section { padding: 1rem; }
  .query-result-card { padding: 1.2rem; }
}

/* ============ 打印样式 ============ */
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .hero-section { background: #fff !important; color: #000 !important; padding: 1rem 0; }
  .hero-section h1 { color: #000; }
  .form-section {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
  .card-report {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  .card-report:hover { transform: none; }
  .btn-red, .btn-red-lg { background: #ccc !important; color: #000 !important; border: 1px solid #999 !important; }
  a { color: #000 !important; text-decoration: underline; }
}
