/* 贷款客户信息采集系统 - 样式文件（全选择版） */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    padding: 0;
    padding-bottom: 80px;
}

.container {
    max-width: 100%;
    padding: 12px;
}

.header {
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: #fff;
    text-align: center;
    padding: 20px 15px;
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.header h2 {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
}

.menu {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.menu-btn {
    flex: 1;
    padding: 14px 10px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.menu-btn.active {
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.menu-btn:active {
    transform: scale(0.98);
}

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

.tit {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 15px;
    color: #0066cc;
    border-left: 4px solid #0066cc;
    padding-left: 10px;
}

.item {
    margin: 15px 0;
}

.item:first-child {
    margin-top: 0;
}

.label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
    font-weight: 500;
}

.label.required::after {
    content: ' *';
    color: #f56c6c;
}

/* 输入框 */
input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: #0066cc;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

input::placeholder {
    color: #bbb;
}

/* 下拉选择框 */
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    transition: all 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #0066cc;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.radio-label:has(input:checked) {
    background: #e6f0ff;
    border-color: #0066cc;
    color: #0066cc;
}

.radio-label input[type="radio"] {
    margin-right: 6px;
    accent-color: #0066cc;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* 多选按钮组 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.checkbox-label:has(input:checked) {
    background: #fff7e6;
    border-color: #fa8c16;
    color: #d46b08;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 6px;
    accent-color: #fa8c16;
}

/* 文本域 */
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    transition: all 0.3s ease;
    resize: vertical;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: #0066cc;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

textarea::placeholder {
    color: #bbb;
}

/* 数字输入框 */
input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    transition: all 0.3s ease;
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"]:focus {
    outline: none;
    border-color: #0066cc;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* 隐藏类 */
.hide {
    display: none !important;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    transition: all 0.3s ease;
}

.submit-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.submit-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.footer {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    color: #999;
    font-size: 12px;
}

/* ==================== 模态弹窗 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f0f2f5;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #f0f2f5;
    width: 100%;
    min-height: 100vh;
    padding: 0;
}

input.error, select.error {
    border-color: #f56c6c;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #0066cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 15px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ==================== 卡片弹窗样式 ==================== */
.sc-top-bar {
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    font-size: 15px;
    font-weight: 600;
}

.sc-close {
    font-size: 18px;
    padding: 2px 8px;
    cursor: pointer;
    opacity: 0.8;
}

.sc-hint {
    text-align: center;
    color: #888;
    font-size: 12px;
    padding: 6px 10px;
}

.share-card {
    margin: 0 10px 15px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.sc-header {
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: #fff;
    text-align: center;
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.sc-body {
    padding: 8px 12px;
}

.sc-row {
    display: flex;
    align-items: baseline;
    padding: 3px 0;
    font-size: 12px;
    line-height: 1.6;
    border-bottom: 1px dashed #f0f0f0;
}

.sc-row:last-child {
    border-bottom: none;
}

.sc-l {
    color: #999;
    flex-shrink: 0;
    width: 68px;
    font-size: 11px;
}

.sc-v {
    color: #333;
    font-weight: 500;
    word-break: break-all;
    flex: 1;
    font-size: 12px;
}

.sc-divider {
    height: 1px;
    background: #e8e8e8;
    margin: 5px 0;
}

.sc-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #0066cc;
    padding: 2px 0;
    margin-bottom: 1px;
}

.sc-footer {
    padding: 6px 12px;
    background: #f5f7fa;
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #bbb;
}

/* ==================== 管理后台样式 ==================== */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.login-box {
    max-width: 400px;
    margin: 100px auto;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-box h1 {
    text-align: center;
    color: #0066cc;
    margin-bottom: 30px;
    font-size: 24px;
}

.login-box .form-group {
    margin-bottom: 20px;
}

.login-box label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.login-box input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

.login-box button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.admin-header {
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h1 {
    font-size: 20px;
    font-weight: 500;
}

.admin-header .header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #fff;
    color: #0066cc;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.search-bar {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.search-bar select {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.search-bar button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #0066cc, #0088ff);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.stat-card .number {
    font-size: 28px;
    font-weight: 700;
    color: #0066cc;
}

.stat-card .label {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.data-table th {
    background: #f5f7fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    font-size: 14px;
    border-bottom: 2px solid #e8e8e8;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.data-table tr:hover {
    background: #f8f9ff;
}

.detail-panel {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.detail-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.detail-label {
    width: 120px;
    color: #888;
    font-size: 14px;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    font-size: 14px;
    color: #333;
}

@media (max-width: 768px) {
    .admin-container { padding: 15px; }
    .data-table { font-size: 13px; }
    .data-table th, .data-table td { padding: 10px 8px; }
    .detail-row { flex-direction: column; }
    .detail-label { width: 100%; margin-bottom: 4px; }
    .admin-header { flex-direction: column; text-align: center; }
    .admin-header .header-actions { width: 100%; justify-content: center; }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 15px;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    background: #0066cc;
    color: #fff;
    transition: all 0.2s ease;
}

@media (max-width: 480px) {
    .container { padding: 10px; }
    .box { padding: 15px; }
    .menu-btn { padding: 12px 8px; font-size: 13px; }
    .radio-label { padding: 7px 10px; font-size: 13px; }
    .checkbox-label { padding: 7px 10px; font-size: 13px; }
    .submit-btn { padding: 14px; font-size: 16px; }
}
