/* ==================== 骚扰电话曝光平台 样式表 ==================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #2563eb; text-decoration: none; }
a:hover { color: #1d4ed8; text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---- 头部导航 ---- */
.header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.logo { font-size: 20px; white-space: nowrap; }
.logo a { color: #1e293b; text-decoration: none; }
.logo a:hover { color: #2563eb; }
.nav { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.nav a {
    padding: 6px 14px;
    border-radius: 6px;
    color: #64748b;
    transition: all .2s;
}
.nav a:hover { background: #f1f5f9; color: #1e293b; text-decoration: none; }
.nav a.active { background: #2563eb; color: #fff; }
.nav a.nav-admin { color: #dc2626; }
.nav a.nav-admin:hover { background: #fef2f2; }
.nav a.nav-admin.active { background: #dc2626; color: #fff; }
.nav-user { color: #64748b; font-weight: 500; padding: 0 4px; }

/* ---- 搜索区域 Hero ---- */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.hero h2 { font-size: 32px; margin-bottom: 10px; }
.hero-desc { color: #94a3b8; font-size: 16px; margin-bottom: 30px; }
.search-box {
    display: flex;
    max-width: 580px;
    margin: 0 auto;
    gap: 0;
}
.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #475569;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
    outline: none;
    background: #fff;
    color: #333;
    transition: border-color .2s;
}
.search-input:focus { border-color: #3b82f6; }
.search-btn {
    padding: 14px 28px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 16px;
    cursor: pointer;
    transition: background .2s;
}
.search-btn:hover { background: #1d4ed8; }
.search-stats { margin-top: 16px; color: #94a3b8; font-size: 14px; }

/* ---- 主内容 ---- */
.main { flex: 1; padding: 30px 20px; }
.main h2 { font-size: 22px; margin-bottom: 20px; color: #1e293b; }

/* ---- 搜索清空 ---- */
.search-clear {
    display: inline-block;
    margin-left: 12px;
    padding: 2px 10px;
    font-size: 12px;
    color: #94a3b8;
    border: 1px solid #475569;
    border-radius: 4px;
    text-decoration: none;
    transition: all .2s;
}
.search-clear:hover { color: #fff; border-color: #ef4444; background: #ef4444; text-decoration: none; }

/* ---- 区域标题 ---- */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

/* ---- 图表区块 ---- */
.chart-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 28px 30px;
    margin-bottom: 24px;
}

/* ---- 分类柱状图 ---- */
.bar-chart { display: flex; flex-direction: column; gap: 14px; }
.bar-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.bar-label {
    width: 60px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-align: right;
    flex-shrink: 0;
}
.bar-track {
    flex: 1;
    height: 28px;
    background: #f1f5f9;
    border-radius: 14px;
    overflow: hidden;
}
.bar-fill {
    display: block;
    height: 100%;
    border-radius: 14px;
    transition: width .8s ease;
    min-width: 4px;
}
.bar-value {
    width: 100px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    flex-shrink: 0;
}
.bar-value small { font-weight: 400; color: #94a3b8; font-size: 12px; }

/* ---- 趋势折线图 ---- */
.line-chart-wrap {
    width: 100%;
    overflow: hidden;
}
.line-chart {
    display: block;
    width: 100%;
    height: auto;
    max-height: 220px;
}

/* ---- 搜索结果提示 ---- */
.search-more {
    text-align: center;
    padding: 24px 0;
    color: #94a3b8;
    font-size: 14px;
}
.search-more strong { color: #1e293b; }

/* ---- 搜索结果区域 ---- */
.search-results-section {
    margin-top: 10px;
}

/* ---- 高亮标记 ---- */
mark {
    background: #fef08a;
    color: #92400e;
    padding: 1px 4px;
    border-radius: 3px;
}

/* ---- 截图展示 ---- */
.report-screenshot {
    margin-top: 12px;
}
.report-screenshot img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: opacity .2s;
}
.report-screenshot img:hover {
    opacity: 0.85;
}
.screenshot-link {
    display: inline-block;
    text-decoration: none;
}
.screenshot-link:hover {
    text-decoration: none;
}

/* ---- 文件上传组件 ---- */
.file-upload {
    display: flex;
    align-items: center;
    gap: 12px;
}
.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}
.file-label {
    display: inline-block;
    padding: 8px 18px;
    background: #f1f5f9;
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    transition: all .2s;
}
.file-label:hover {
    background: #e2e8f0;
    border-color: #2563eb;
    color: #2563eb;
}
.file-name {
    font-size: 13px;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}
.form-tip-inline {
    font-weight: 400;
    font-size: 12px;
    color: #94a3b8;
}

/* ---- 管理后台截图缩略图 ---- */
.admin-screenshot-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    transition: opacity .2s;
}
.admin-screenshot-thumb:hover {
    opacity: 0.7;
}
.admin-screenshot-current {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.admin-screenshot-current img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.admin-screenshot-remove {
    font-size: 13px;
    color: #dc2626;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}
.admin-screenshot-remove input {
    margin: 0;
}

/* ---- 筛选栏 ---- */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    transition: all .2s;
}
.filter-btn:hover { border-color: #2563eb; color: #2563eb; text-decoration: none; }
.filter-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* ---- 号码卡片列表 ---- */
.report-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.report-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 22px;
    transition: box-shadow .2s;
}
.report-item:hover { box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.report-phone { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.report-phone a { color: #1e293b; }
.report-phone a:hover { color: #2563eb; }
.report-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #94a3b8; margin-bottom: 6px; }
.report-desc { font-size: 14px; color: #475569; margin-top: 6px; }
.report-location { font-size: 13px; color: #64748b; margin-top: 4px; }

/* ---- 号码归属地 ---- */
.phone-location { font-size: 13px; color: #64748b; font-weight: 400; margin-left: 8px; }
.phone-loc-bar {
    background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px;
    padding: 12px 18px; margin-bottom: 16px; font-size: 15px; color: #0369a1;
}

/* ---- 号码详情页 ---- */
.phone-detail { }
.phone-detail h2 { font-size: 26px; margin-bottom: 16px; }
.stats-bar {
    display: flex; gap: 20px; flex-wrap: wrap;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    padding: 16px 22px; margin-bottom: 20px; font-size: 14px; color: #64748b;
}
.stats-bar strong { color: #1e293b; }
.stat-item { }

/* ---- 标签 ---- */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
}
.tag-1 { background: #dc2626; } /* 诈骗 */
.tag-2 { background: #ea580c; } /* 催收 */
.tag-3 { background: #ca8a04; } /* 骚扰 */
.tag-4 { background: #64748b; } /* 其他 */

/* ---- 分页 ---- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}
.scroll-trigger {
    text-align: center;
    padding: 30px 0;
    color: #94a3b8;
    font-size: 14px;
}
.scroll-loader { display: none; }
.scroll-loader span {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #2563eb;
    margin: 0 4px;
    animation: scroll-load 1s infinite ease-in-out;
}
.scroll-loader span:nth-child(2) { animation-delay: .15s; }
.scroll-loader span:nth-child(3) { animation-delay: .3s; }
@keyframes scroll-load {
    0%,80%,100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}
.scroll-text { margin-top: 8px; }
.scroll-end { color: #94a3b8; font-size: 13px; padding: 10px 0; }
.page-btn {
    padding: 8px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #64748b;
    font-size: 14px;
    transition: all .2s;
}
.page-btn:hover { border-color: #2563eb; color: #2563eb; text-decoration: none; }
.page-info { font-size: 14px; color: #94a3b8; }

/* ---- 空状态 ---- */
.empty { text-align: center; padding: 60px 0; color: #94a3b8; }
.empty p { margin-bottom: 10px; }
.empty a { color: #2563eb; }

/* ---- 表单 ---- */
.form-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 30px;
}
.form-box h2 { margin-bottom: 6px; }
.form-tip { color: #94a3b8; font-size: 14px; margin-bottom: 20px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.form-group .required { color: #dc2626; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #2563eb; }
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }
.form-footer { text-align: center; margin-top: 16px; font-size: 14px; color: #64748b; }

/* ---- 个人信息展示 ---- */
.info-lines { }
.info-line { padding: 10px 0; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; }
.info-line:last-child { border-bottom: none; }
.info-label { font-size: 14px; color: #64748b; width: 100px; flex-shrink: 0; }
.info-value { font-size: 15px; color: #1e293b; font-weight: 500; }

/* ---- 按钮 ---- */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all .2s;
    text-align: center;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; color: #fff; text-decoration: none; }

.btn-sm {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    border: none;
    transition: all .2s;
}
.btn-ok { background: #059669; color: #fff; }
.btn-ok:hover { background: #047857; }
.btn-no { background: #dc2626; color: #fff; }
.btn-no:hover { background: #b91c1c; }
.btn-del { background: #64748b; color: #fff; }
.btn-del:hover { background: #475569; }

/* ---- 消息提示 ---- */
.msg {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.msg-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.msg-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ---- 表格 ---- */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.table th { background: #f8fafc; color: #64748b; font-weight: 600; }
.table tr:hover { background: #f8fafc; }
.desc-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-cell { white-space: nowrap; }

/* ---- 状态标签 ---- */
.status-ok { color: #059669; font-weight: 500; }
.status-no { color: #dc2626; font-weight: 500; }
.status-pending { color: #ca8a04; font-weight: 500; }

/* ---- 管理后台 ---- */
.admin-layout { display: flex; gap: 24px; align-items: flex-start; }
.admin-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 0;
}
.admin-sidebar h3 { padding: 0 16px 12px; font-size: 15px; color: #64748b; border-bottom: 1px solid #f1f5f9; }
.admin-sidebar ul { list-style: none; }
.admin-sidebar li a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: #374151;
    transition: all .2s;
}
.admin-sidebar li a:hover { background: #f1f5f9; text-decoration: none; }
.admin-sidebar li a.active { background: #2563eb; color: #fff; }
.admin-content { flex: 1; min-width: 0; }

/* ---- 管理后台搜索 ---- */
.admin-search { margin-bottom: 16px; }
.search-row { display: flex; gap: 8px; align-items: stretch; }
.search-row input,
.search-row select {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: #fff;
}
.search-row input:focus,
.search-row select:focus { border-color: #2563eb; }
@media (max-width: 768px) {
    .search-row { flex-direction: column; }
}

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
}
.stat-number { font-size: 32px; font-weight: 700; color: #1e293b; }
.stat-label { font-size: 14px; color: #94a3b8; margin-top: 4px; }
.stat-warn .stat-number { color: #ca8a04; }

/* ---- 页脚 ---- */
.footer {
    background: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 24px 0;
    margin-top: auto;
    font-size: 13px;
}
.footer-warn { color: #fbbf24; margin-top: 6px; }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .header-inner { flex-direction: column; height: auto; padding: 12px 0; gap: 10px; }
    .nav { flex-wrap: wrap; justify-content: center; }
    .hero { padding: 40px 0; }
    .hero h2 { font-size: 24px; }
    .search-box { flex-direction: column; gap: 8px; }
    .search-input { border-radius: 8px; border-right: 2px solid #475569; }
    .search-btn { border-radius: 8px; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 0; }
    .report-list { grid-template-columns: 1fr; }
    .report-meta { flex-direction: column; gap: 4px; }
    .bar-row { flex-wrap: wrap; gap: 6px; }
    .bar-label { width: auto; text-align: left; }
    .bar-value { width: auto; }
    .line-chart { max-height: 160px; }
    .chart-section { padding: 20px 16px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
