* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif;
}

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    display: flex;
    flex-direction: column;
}

/* 主容器：响应式自适应 */
.container {
    width: 100%;
    flex: 1;
    padding: 12px;
    margin: 0 auto;
}

/* 手机竖屏 */
@media (min-width: 360px) {
    body { font-size: 15px; }
    .container { padding: 14px; }
}

/* 平板/手机横屏 */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: 20px 16px;
    }
    body { font-size: 15px; }
}

/* 电脑桌面 */
@media (min-width: 1024px) {
    .container {
        max-width: 1000px;
        padding: 24px 20px;
    }
}

/* 页脚 */
.footer {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 16px 12px 20px;
    line-height: 1.8;
}

/* 顶部导航 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.header h2 {
    font-size: 18px;
    color: #1f1f1f;
    font-weight: 600;
}

.header a {
    color: #666;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    margin-left: 14px;
}

.header a:hover { color: #1677ff; }

/* 公告栏 */
.notice {
    background: #fff7e6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #d46b08;
    word-break: break-all;
    line-height: 1.7;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
}

.title {
    font-size: 16px;
    margin-bottom: 18px;
    color: #1f1f1f;
    border-left: 4px solid #1677ff;
    padding-left: 10px;
    font-weight: 600;
}

/* 表单 */
.form-item {
    margin-bottom: 18px;
}

.form-item > label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #434343;
    font-weight: 500;
}

/* 普通输入框、下拉框 */
input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
    -webkit-appearance: none;
    background: #fff;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    border-color: #1677ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.1);
}

input:disabled {
    background: #f5f5f5;
    color: #bfbfbf;
    cursor: not-allowed;
}

/* 复选框修复：恢复原生大小，不拉伸 */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    cursor: pointer;
    -webkit-appearance: checkbox;
    appearance: checkbox;
}

/* 下拉选择美化 */
.select-wrap {
    position: relative;
}
.select-wrap::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-top-color: #8c8c8c;
    pointer-events: none;
}

/* 单选按钮美化 */
.radio-group {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.radio-label {
    flex: 1;
    min-width: 75px;
    padding: 11px 8px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: #595959;
    position: relative;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label input:checked + span {
    color: #1677ff;
    font-weight: 500;
}

.radio-label:has(input:checked) {
    border-color: #1677ff;
    background: #e6f4ff;
}

/* 按钮统一样式 */
.btn {
    display: inline-block;
    padding: 11px 18px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    line-height: 1.4;
    -webkit-tap-highlight-color: transparent;
}

.btn-block { width: 100%; }
.btn-primary { background: #1677ff; color: #fff; }
.btn-primary:hover { background: #0958d9; }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #389e0d; }
.btn-warning { background: #ff7a45; color: #fff; }
.btn-warning:hover { background: #fa541c; }
.btn-default { background: #fff; color: #595959; border: 1px solid #d9d9d9; }
.btn-default:hover { border-color: #1677ff; color: #1677ff; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #cf1322; }
.btn:disabled { background: #bfbfbf; cursor: not-allowed; border-color: #bfbfbf; color: #fff; }

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* 信息展示卡片 */
.info-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px dashed #f0f0f0;
    font-size: 14px;
    align-items: center;
}

.info-label {
    width: 100px;
    color: #8c8c8c;
    flex-shrink: 0;
}

.info-value {
    font-weight: 500;
    color: #1f1f1f;
    word-break: break-all;
    flex: 1;
}

.tag {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.tag-red { background: #fff1f0; color: #cf1322; border: 1px solid #ffccc7; }
.tag-green { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.tag-blue { background: #e6f4ff; color: #1677ff; border: 1px solid #91caff; }
.tag-gray { background: #f5f5f5; color: #8c8c8c; border: 1px solid #d9d9d9; }

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal.show { display: flex; }

.modal-box {
    background: #fff;
    width: 100%;
    max-width: 380px;
    border-radius: 12px;
    overflow: hidden;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    font-size: 16px;
    color: #1f1f1f;
}

.modal-body {
    padding: 20px;
    font-size: 14px;
    color: #595959;
    line-height: 1.7;
}

.modal-body .confirm-info {
    background: #fafafa;
    padding: 12px 14px;
    border-radius: 8px;
    margin-top: 12px;
}
.modal-body .confirm-info p { margin: 4px 0; }

.modal-footer {
    display: flex;
    border-top: 1px solid #f0f0f0;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
}

.modal-btn-cancel { color: #595959; border-right: 1px solid #f0f0f0; }
.modal-btn-confirm { color: #1677ff; font-weight: 500; }

/* 统计卡片 */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.stat-item {
    background: #fff;
    padding: 18px 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-num {
    font-size: 24px;
    font-weight: 600;
    color: #1677ff;
    margin-bottom: 6px;
}

.stat-text {
    font-size: 13px;
    color: #8c8c8c;
}

/* 表格 */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

.table th, .table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    white-space: nowrap;
}

.table th {
    background: #fafafa;
    font-weight: 600;
    color: #595959;
    font-size: 13px;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover { background: #fafafa; }

/* 后台表单行 */
.form-line {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.form-line label {
    min-width: 100px;
    color: #595959;
    font-size: 14px;
}

.form-line input {
    flex: 1;
    min-width: 180px;
}

.section-title {
    margin: 22px 0 14px;
    font-size: 15px;
    color: #333;
    border-left: 3px solid #1677ff;
    padding-left: 10px;
    font-weight: 600;
}

/* 消息提示 */
.msg-box {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}
.msg-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.msg-error { background: #fff2f0; color: #cf1322; border: 1px solid #ffccc7; }

/* 大屏适配：中介/班组/岗位表格放宽 */
@media (min-width: 1024px) {
    .config-table {
        max-width: 500px;
    }
}

/* 小屏幕适配 */
@media (max-width: 375px) {
    .header h2 { font-size: 16px; }
    .card { padding: 16px 14px; }
    .stat-num { font-size: 20px; }
    .radio-label { font-size: 13px; padding: 10px 6px; }
    .stats { gap: 8px; }
    .stat-item { padding: 14px 6px; }
}