/* ==========================================================================
   SG/IC 加密系统 —— 前台样式
   作者：CelestialJourney    官方站点：https://sgapi.xueyuanpie.com/
   ========================================================================== */

body {
    background: #f2f4f7;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: #1f2937;
    margin: 0;
}

/* ---------- 顶部 ---------- */
.front-header {
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 60%, #3f77b8 100%);
    color: #fff;
    padding: 16px 0;
}
.front-header .inner { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.front-header .brand { display: flex; align-items: center; gap: 10px; }
.front-header .brand .logo {
    width: 38px; height: 38px; border-radius: 9px; background: rgba(255, 255, 255, .16);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.front-header h1 { font-size: 18px; margin: 0; font-weight: 600; }
.front-header .sub { font-size: 12px; opacity: .78; margin-top: 2px; }
.front-header .right { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.card-chip {
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 20px; padding: 5px 14px; font-size: 12px; line-height: 20px;
}
.card-chip b { color: #ffe58f; }
.card-chip .k { font-family: monospace; letter-spacing: .5px; }

.front-main { max-width: 1180px; margin: 18px auto 40px; padding: 0 16px; }

/* ---------- 公告 ---------- */
.notice-bar {
    background: #fff8e6; border: 1px solid #ffe1a8; color: #8a6d3b;
    border-radius: 6px; padding: 11px 16px; font-size: 13px; line-height: 1.9; margin-bottom: 14px;
    white-space: pre-wrap;
}
.notice-bar .layui-icon { margin-right: 6px; color: #e6a23c; }

/* ---------- 卡片 ---------- */
.f-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(16, 24, 40, .07); padding: 18px 20px; margin-bottom: 14px; }
.f-card > h2 { font-size: 15px; margin: 0 0 14px; padding-left: 10px; border-left: 3px solid #1e6fd9; line-height: 1.2; font-weight: 600; }
.f-card > h2 .sub { font-size: 12px; color: #98a2b3; font-weight: 400; margin-left: 8px; }

.section-label { font-size: 13px; font-weight: 600; color: #374151; margin: 16px 0 10px; padding-left: 8px; border-left: 2px solid #d7e3f4; }
.section-label:first-child { margin-top: 0; }
.help { font-size: 12px; color: #98a2b3; line-height: 1.8; margin: 4px 0 8px; }

/* ---------- 开关行 ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed #eef1f5; }
.switch-row:last-child { border-bottom: none; }
.switch-row .t { font-size: 13px; color: #1f2937; }
.switch-row .d { font-size: 12px; color: #98a2b3; margin-top: 2px; }
.opt-block { display: none; }
.opt-block.show { display: block; }

/* ---------- 上传区 ---------- */
.upload-area {
    border: 2px dashed #cfd8e3; border-radius: 8px; padding: 34px 18px; text-align: center;
    cursor: pointer; transition: all .2s; background: #fafbfd;
}
.upload-area:hover, .upload-area.dragover { border-color: #1e6fd9; background: #f2f7ff; }
.upload-area.has-file { border-color: #2ba471; background: #f2fbf6; }
.upload-area .icon { font-size: 40px; color: #cfd8e3; line-height: 1; }
.upload-area.has-file .icon { color: #2ba471; }
.upload-area p { margin: 8px 0 0; color: #6b7280; font-size: 13px; }
.upload-area .tip { font-size: 12px; color: #98a2b3; margin-top: 4px; }

.file-info { margin-top: 12px; padding: 12px 14px; background: #f7f9fc; border-radius: 6px; display: none; }
.file-info.show { display: block; }
.file-info .row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.file-info .row .label { color: #6b7280; }
.file-info .row .value { color: #1f2937; font-weight: 500; word-break: break-all; }
.file-info .row .value.price { color: #d9363e; font-weight: 600; }
.progress-wrap { margin-top: 12px; display: none; }
.progress-wrap.show { display: block; }

/* ---------- 结果弹窗 ---------- */
.result-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.result-item { flex: 1 1 120px; background: #f5f8ff; border-radius: 6px; padding: 12px 10px; text-align: center; }
.result-item .l { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.result-item .v { font-size: 15px; font-weight: 600; color: #1f2937; word-break: break-all; }
.result-item .v.hl { color: #1e6fd9; }
.result-item.ok { background: #f2fbf6; }
.result-item.bad { background: #fdf2f2; }
.result-item .v.ok { color: #2ba471; }
.result-item .v.bad { color: #d9363e; }
.result-actions { text-align: center; padding-top: 4px; }

/* ---------- 卡密门禁 ---------- */
.gate-mask {
    position: fixed; inset: 0; background: rgba(17, 24, 39, .55); z-index: 1200;
    display: none; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box;
}
.gate-mask.show { display: flex; }
.gate-box { background: #fff; border-radius: 10px; width: 400px; max-width: 100%; padding: 30px 30px 24px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
.gate-box h3 { margin: 0 0 6px; font-size: 18px; }
.gate-box .sub { font-size: 12px; color: #98a2b3; margin-bottom: 20px; line-height: 1.7; }
.gate-box .layui-input { height: 44px; line-height: 44px; font-family: monospace; letter-spacing: 1px; }
.gate-box .btn { width: 100%; height: 44px; line-height: 44px; margin-top: 6px; }
.gate-err { color: #d9363e; font-size: 12px; min-height: 18px; margin-top: 6px; }

/* ---------- 页脚 ---------- */
.front-footer { text-align: center; color: #98a2b3; font-size: 12px; line-height: 2; padding: 10px 16px 30px; }
.front-footer a { color: #1e6fd9; text-decoration: none; }

/* ---------- 表格 ---------- */
.f-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.f-table th, .f-table td { border: 1px solid #eef1f5; padding: 8px 12px; text-align: left; }
.f-table th { background: #f7f9fc; color: #4a5568; font-weight: 600; }
.f-table td { color: #4b5563; }

.layui-form-label { width: 130px; font-size: 13px; }
.layui-input-block { margin-left: 160px; }
.layui-form-item { margin-bottom: 12px; }
@media (max-width: 760px) {
    .layui-form-label { width: 100px; }
    .layui-input-block { margin-left: 120px; }
    .front-header .right { width: 100%; }
}
