/* =====================================
   在线报名系统 - 全局样式
   ===================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f5f7fa;
    color: #303133;
    min-height: 100vh;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ---------- 顶部导航 ---------- */
.nav-bar {
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(26,115,232,0.18);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.nav-links a {
    margin-left: 22px;
    font-size: 14px;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; font-weight: 600; }
.nav-links a.active::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    margin-top: 4px;
    border-radius: 2px;
}

/* ---------- 主容器 ---------- */
.container {
    max-width: 720px;
    margin: 28px auto;
    padding: 0 20px 40px;
}

/* ---------- 卡片 ---------- */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1a73e8;
}
.card-subtitle {
    color: #909399;
    font-size: 13px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ebeef5;
}

/* ---------- 步骤条 ---------- */
.steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}
.steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e4e7ed;
    z-index: 0;
}
.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}
.step-num {
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: #e4e7ed;
    color: #fff;
    margin: 0 auto 8px;
    font-weight: 700;
    font-size: 14px;
}
.step.active .step-num, .step.done .step-num {
    background: #1a73e8;
}
.step.done .step-num { background: #52c41a; }
.step-text {
    font-size: 13px;
    color: #909399;
    font-weight: 500;
}
.step.active .step-text { color: #1a73e8; font-weight: 600; }
.step.done .step-text { color: #52c41a; }

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 22px; }
.form-label {
    display: block;
    font-size: 14px;
    color: #606266;
    font-weight: 600;
    margin-bottom: 8px;
}
.form-label .req { color: #f56c6c; margin-right: 3px; }
.form-label .tip { color: #909399; font-weight: 400; font-size: 12px; margin-left: 6px; }

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #dcdfe6;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.25s;
    background: #fff;
    outline: none;
    font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}
.form-input.error, .form-select.error {
    border-color: #f56c6c;
    box-shadow: 0 0 0 3px rgba(245,108,108,0.1);
}
.form-error {
    color: #f56c6c;
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
}

/* 组别选项卡 */
.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.group-item {
    padding: 14px 12px;
    border: 1.5px solid #e4e7ed;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: #fff;
}
.group-item:hover { border-color: #a8c5f5; background: #f5f9ff; }
.group-item.selected {
    border-color: #1a73e8;
    background: #eaf2ff;
}
.group-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f7fa;
}
.group-name { font-weight: 600; color: #303133; margin-bottom: 4px; }
.group-desc { font-size: 12px; color: #909399; }
.group-fee {
    color: #f56c6c;
    font-weight: 600;
    margin-top: 6px;
    font-size: 13px;
}
.group-hint {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #fef0f0;
    color: #f56c6c;
}

/* ---------- 注意事项 ---------- */
.notice-box {
    background: #fafcff;
    border: 1px solid #d9e8ff;
    border-radius: 10px;
    padding: 22px;
    max-height: 360px;
    overflow-y: auto;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.8;
}
.notice-box h3 { color: #1a73e8; margin: 0 0 10px; }
.notice-box h3:not(:first-child) { margin-top: 16px; }
.notice-box ul { padding-left: 22px; margin: 8px 0; }
.notice-box li { margin-bottom: 6px; }

/* ---------- 电子签名 ---------- */
.signature-wrap {
    border: 1.5px dashed #c0c4cc;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    margin-top: 8px;
}
.signature-wrap canvas {
    width: 100%;
    height: 180px;
    display: block;
    cursor: crosshair;
    background: #fefefe;
    border-radius: 6px;
    touch-action: none;
}
.signature-tip {
    text-align: center;
    color: #c0c4cc;
    font-size: 12px;
    margin-top: 8px;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block;
    padding: 11px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: center;
    font-family: inherit;
}
.btn-block { width: 100%; }
.btn-primary {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: #fff;
    box-shadow: 0 4px 12px rgba(26,115,232,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(26,115,232,0.35); }
.btn-primary:disabled { background: #a8c5f5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-default {
    background: #f2f6fc;
    color: #606266;
    border: 1px solid #dcdfe6;
}
.btn-default:hover { background: #eaf2ff; color: #1a73e8; border-color: #1a73e8; }
.btn-success {
    background: linear-gradient(135deg, #52c41a, #73d13d);
    color: #fff;
    box-shadow: 0 4px 12px rgba(82,196,26,0.3);
}
.btn-danger {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* ---------- 复选框 ---------- */
.checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    padding: 14px 0;
    margin-top: 12px;
}
.checkbox-wrap input { margin-top: 3px; width: 18px; height: 18px; cursor: pointer; accent-color: #1a73e8; }
.checkbox-wrap label { font-size: 14px; color: #303133; font-weight: 500; cursor: pointer; }

/* ---------- 查询结果 ---------- */
.result-card {
    padding: 22px;
    background: #fafcff;
    border-radius: 10px;
    border: 1px solid #d9e8ff;
    margin-top: 20px;
}
.result-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px dashed #d9e8ff;
    font-size: 14px;
}
.result-row:last-child { border-bottom: none; }
.result-label {
    width: 110px;
    color: #909399;
    flex-shrink: 0;
}
.result-value {
    color: #303133;
    font-weight: 500;
    word-break: break-all;
}
.signature-img {
    margin-top: 12px;
    max-width: 300px;
    max-height: 120px;
    border: 1px solid #e4e7ed;
    border-radius: 6px;
    padding: 6px;
    background: #fff;
}

/* ---------- 提示框 ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}
.alert-info { background: #ecf5ff; color: #1a73e8; border: 1px solid #d9e8ff; }
.alert-success { background: #f0f9eb; color: #52c41a; border: 1px solid #c2e7b0; }
.alert-error { background: #fef0f0; color: #f56c6c; border: 1px solid #fbc4c4; }
.alert-warning { background: #fdf6ec; color: #e6a23c; border: 1px solid #f5dab1; }

/* ---------- 搜索查询 ---------- */
.search-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}
.search-wrap .form-input { flex: 1; }

/* ---------- 空状态 ---------- */
.empty {
    text-align: center;
    padding: 50px 0;
    color: #c0c4cc;
}
.empty-icon { font-size: 50px; margin-bottom: 14px; }

/* ---------- 逻辑条件提示 ---------- */
.condition-hint {
    padding: 10px 12px;
    background: #fdf6ec;
    color: #e6a23c;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 10px;
}

/* =====================================
   后台管理样式
   ===================================== */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 60px;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
}
.admin-header h2 { color: #303133; font-size: 22px; }

.admin-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    margin-bottom: 22px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 26px;
}
.stat-item {
    padding: 22px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.stat-num { font-size: 30px; font-weight: 700; color: #1a73e8; }
.stat-label { color: #909399; font-size: 13px; margin-top: 6px; }

/* 表格 */
.table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #ebeef5;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th {
    background: #f5f7fa;
    color: #606266;
    font-weight: 600;
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #ebeef5;
    white-space: nowrap;
}
.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f2f6fc;
    color: #303133;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafcff; }
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}
.badge-primary { background: #ecf5ff; color: #1a73e8; }
.badge-success { background: #f0f9eb; color: #52c41a; }
.badge-warning { background: #fdf6ec; color: #e6a23c; }
.badge-danger { background: #fef0f0; color: #f56c6c; }

.action-btn {
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    border: none;
    margin-right: 6px;
    font-family: inherit;
}

/* 登录 */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}
.login-card {
    background: #fff;
    padding: 40px 36px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.login-title {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #303133;
    margin-bottom: 6px;
}
.login-sub {
    text-align: center;
    color: #909399;
    font-size: 13px;
    margin-bottom: 30px;
}

/* Tab */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #ebeef5;
    margin-bottom: 24px;
}
.tab-item {
    padding: 10px 22px;
    cursor: pointer;
    color: #606266;
    font-weight: 500;
    font-size: 14px;
    position: relative;
    margin-bottom: -2px;
}
.tab-item.active { color: #1a73e8; font-weight: 600; }
.tab-item.active::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: #1a73e8;
    border-radius: 2px;
}

/* 响应式 */
@media (max-width: 600px) {
    .card { padding: 22px 18px; }
    .nav-inner { padding: 14px 16px; }
    .nav-links a { margin-left: 14px; font-size: 13px; }
    .btn-group { flex-direction: column; }
    .group-grid { grid-template-columns: repeat(2, 1fr); }
    .result-label { width: 90px; font-size: 13px; }
    .search-wrap { flex-direction: column; }
}
