/* 签到页样式 */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --c-primary: #667eea;
    --c-primary-dark: #5a67d8;
    --c-success: #48bb78;
    --c-danger: #e53e3e;
    --c-warn: #d69e2e;
    --c-text: #2d3748;
    --c-muted: #718096;
    --c-border: #e2e8f0;
    --c-bg: #f7fafc;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
}

/* 顶栏 */
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    max-width: 720px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-weight: 700;
    font-size: 17px;
    color: var(--c-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--c-muted);
}

.btn-link {
    background: none;
    border: none;
    color: var(--c-primary);
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* 容器 */
.wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.card h1 { font-size: 20px; margin: 0 0 4px; }
.card h2 { font-size: 17px; margin: 16px 0 8px; }
.card h3 { font-size: 15px; margin: 20px 0 10px; }
.card h4 { font-size: 15px; margin: 0 0 8px; }

.muted {
    color: var(--c-muted);
    font-size: 13px;
}

/* 表单 */
label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin: 14px 0 6px;
    color: #4a5568;
}

input[type="tel"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--c-border);
    border-radius: 7px;
    font-size: 15px;
    background: #fff;
    transition: border-color .15s;
}

input:focus {
    outline: none;
    border-color: var(--c-primary);
}

/* 按钮 */
.btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s, background .15s;
    margin-top: 16px;
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--c-primary-dark); }

.btn-success { background: var(--c-success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #38a169; }

.btn-ghost {
    background: #edf2f7;
    color: #4a5568;
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    margin-top: 0;
}

.btn-ghost:hover:not(:disabled) { background: #e2e8f0; }

.actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 提示 */
.alert {
    padding: 10px 13px;
    border-radius: 7px;
    font-size: 13px;
    margin-top: 12px;
}

.alert-error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

.notice {
    font-size: 12px;
    color: var(--c-muted);
    line-height: 1.8;
    padding: 0 4px;
}

.notice code {
    background: #edf2f7;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
}

/* 地图 */
.map-box {
    height: 220px;
    border-radius: 8px;
    background: #edf2f7;
    overflow: hidden;
}

/* 定位详情 */
.loc-detail {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.9;
    margin-top: 10px;
    padding: 10px 13px;
    background: #f7fafc;
    border-radius: 7px;
    min-height: 20px;
}

.loc-detail:empty { display: none; }

/* 地点列表 */
.location-list { display: flex; flex-direction: column; gap: 10px; }

.loc-item {
    border: 1px solid var(--c-border);
    border-radius: 8px;
    padding: 12px 14px;
}

.loc-name { font-weight: 600; font-size: 14px; }

.loc-distance {
    font-size: 13px;
    margin-top: 4px;
    font-weight: 500;
}

/* 记录 */
.record-list { display: flex; flex-direction: column; gap: 10px; }

.rec-item {
    border-left: 3px solid var(--c-border);
    padding: 10px 0 10px 13px;
    font-size: 13px;
    color: #4a5568;
}

.rec-ok { border-left-color: var(--c-success); }
.rec-bad { border-left-color: var(--c-danger); }

.rec-name { font-weight: 600; color: var(--c-text); font-size: 14px; }
.rec-status { margin-top: 4px; font-size: 12px; }

/* 诊断 */
.diag {
    background: #fffaf0;
    border: 1px solid #feebc8;
}

.diag ol {
    margin: 8px 0;
    padding-left: 20px;
    font-size: 13px;
    color: #4a5568;
}

.diag p { font-size: 13px; color: #4a5568; margin: 6px 0; }

/* 移动端 */
@media (max-width: 480px) {
    .wrap { padding: 12px; }
    .card { padding: 16px; border-radius: 8px; }
    .map-box { height: 180px; }
}
/* 微信登录 */
.btn-wechat { background: #07C160; color: #fff; }
.btn-wechat:hover:not(:disabled) { background: #06AD56; }
.center { text-align: center; margin-top: 10px; }

/* 电脑端扫码引导 */
.qr-block {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #feebc8;
}

.qr-block img {
    border-radius: 6px;
    background: #fff;
    flex-shrink: 0;
}

.qr-text { font-size: 13px; color: #4a5568; }

.qr-text p { margin: 4px 0; }

.qr-url {
    word-break: break-all;
    font-size: 12px;
    color: #a0aec0;
}
