:root {
    --primary: #2563eb;
    --primary-deep: #145ccd;
    --primary-soft: #eaf1ff;
    --bg: #f4f6fa;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e8ebf0;
    --success: #16a34a;
    --danger: #dc2626;
    --radius: 14px;
    --shadow: 0 6px 20px rgba(31, 45, 61, .06);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    background: #e9edf4;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

img {
    display: block;
    max-width: 100%;
}

.app {
    position: relative;
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--bg);
    padding-bottom: 76px;
    overflow-x: hidden;
}

/* 顶部品牌栏 */
.app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 14px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.brand-logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
}

.brand-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.header-link {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 15px;
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 600;
}

/* 提示条 */
.flash {
    margin: 10px 14px 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    background: var(--primary-soft);
    color: var(--primary-deep);
}

.flash-success {
    background: #eaf8ee;
    color: #15803d;
}

.flash-error {
    background: #fdecec;
    color: #b91c1c;
}

/* 横幅 */
.banner {
    margin: 12px 14px 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, #dbe8ff, #f2f7ff);
    box-shadow: var(--shadow);
}

.banner img {
    width: 100%;
    height: 148px;
    object-fit: cover;
}

/* 诚信认证行 */
.trust-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 18px 4px;
    font-size: 13px;
    color: #374151;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trust-item::before {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: inset 0 0 0 4px #fff;
    display: inline-block;
}

.trust-city {
    margin-left: auto;
    padding: 2px 10px;
    border-radius: 12px;
    background: #fff;
    color: var(--primary-deep);
    font-size: 12px;
}

/* 区块标题 */
.section {
    margin-top: 16px;
    padding: 0 14px;
}

.section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .3px;
}

.section-sub {
    margin-left: auto;
    font-size: 12px;
    color: var(--muted);
}

.section-line {
    width: 70px;
    height: 18px;
    object-fit: contain;
}

/* 服务九宫格 */
.service-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px 4px;
    padding: 14px 8px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #374151;
    text-align: center;
}

.service-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* 双入口卡片 */
.action-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 14px 0;
}

.action-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-height: 92px;
    padding: 16px 12px;
    border-radius: var(--radius);
    overflow: hidden;
    color: #123;
    background: linear-gradient(135deg, #e7f0ff 0%, #f7fbff 100%);
    box-shadow: var(--shadow);
}

.action-card.alt {
    background: linear-gradient(135deg, #fff3e6 0%, #fffaf3 100%);
}

.action-card-text strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
}

.action-card-text span {
    font-size: 12px;
    color: var(--muted);
}

.action-card img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

/* 优秀推荐 */
.recommend-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 6px;
}

.recommend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 8px 2px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(31, 45, 61, .04);
    font-size: 11px;
    color: var(--muted);
    text-align: center;
}

.recommend-item img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2f7;
}

.recommend-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.recommend-meta {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 通用按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: #eef2f7;
    color: #374151;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
}

.btn-block {
    width: 100%;
}

.btn-ghost {
    background: #fff;
    color: var(--primary-deep);
    border: 1px solid #d7e4ff;
}

/* 列表卡片 */
.list-wrap {
    padding: 0 14px;
}

.worker-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    margin-bottom: 12px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.worker-main {
    flex: 1;
    min-width: 0;
}

.worker-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.worker-title .tag {
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 11px;
    font-weight: 500;
}

.worker-meta {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 2px;
}

.worker-meta b {
    color: #374151;
    font-weight: 600;
}

.worker-photo {
    width: 84px;
    height: 104px;
    border-radius: 10px;
    object-fit: cover;
    background: #eef2f7;
    flex-shrink: 0;
}

.call-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 5px 12px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary-deep);
    font-size: 13px;
    font-weight: 600;
}

.call-btn::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}

/* 搜索栏 */
.search-bar {
    display: flex;
    gap: 8px;
    margin: 12px 14px 0;
}

.search-bar input {
    flex: 1;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    font-size: 14px;
    outline: none;
}

.search-bar input:focus {
    border-color: #bcd0ff;
}

.search-bar button {
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
}

/* 分页 */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 18px 14px 8px;
    font-size: 14px;
}

.pager-btn {
    padding: 7px 16px;
    border-radius: 18px;
    background: #fff;
    color: var(--primary-deep);
    box-shadow: 0 2px 8px rgba(31, 45, 61, .05);
}

.pager-btn.disabled {
    color: #b3b9c4;
    background: #f0f2f6;
    box-shadow: none;
}

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

/* 详情页 */
.detail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px 14px 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.detail-gallery img {
    flex: 0 0 auto;
    width: 82%;
    height: 300px;
    border-radius: var(--radius);
    object-fit: cover;
    background: #eef2f7;
    scroll-snap-align: center;
}

.detail-section {
    margin: 12px 14px 0;
    padding: 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.detail-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
}

.detail-section h3::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 2px;
    background: var(--primary);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    font-size: 14px;
    border-bottom: 1px dashed #f0f2f6;
}

.detail-row:last-child {
    border-bottom: 0;
}

.detail-row .label {
    color: var(--muted);
    flex-shrink: 0;
}

.detail-row .value {
    color: #374151;
    text-align: right;
    word-break: break-all;
}

.detail-text {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.cert-list {
    display: grid;
    gap: 10px;
}

.cert-item {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f7f9fc;
    font-size: 13px;
    color: #4b5563;
}

.cert-item b {
    color: var(--text);
}

.detail-actions {
    position: sticky;
    bottom: 76px;
    padding: 10px 14px;
    background: linear-gradient(to top, var(--bg) 60%, rgba(244, 246, 250, 0));
}

/* 岗位卡片 */
.job-card {
    padding: 15px;
    margin-bottom: 12px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.job-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.job-title {
    font-size: 16px;
    font-weight: 700;
}

.job-no {
    font-size: 12px;
    color: var(--muted);
    background: #f2f5fa;
    padding: 2px 8px;
    border-radius: 10px;
}

.job-line {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: 3px;
}

.job-line b {
    color: #374151;
    font-weight: 600;
}

.job-content {
    margin: 8px 0 0;
    padding-top: 8px;
    border-top: 1px dashed #eef1f5;
    font-size: 13.5px;
    color: #4b5563;
    line-height: 1.7;
    word-break: break-all;
}

/* 表单 */
.form-card {
    margin: 12px 14px 0;
    padding: 18px 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-title {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.field .req {
    color: var(--danger);
}

.input,
.textarea,
.select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfcfe;
    font-size: 15px;
    color: var(--text);
    outline: none;
    font-family: inherit;
}

.textarea {
    height: 110px;
    padding: 12px 14px;
    resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
    border-color: #bcd0ff;
    background: #fff;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.form-hint {
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
}

/* 未登录提示 */
.login-tip {
    margin: 12px 14px 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff8e8;
    color: #92400e;
    font-size: 13px;
}

/* 我的页面 */
.mine-hero {
    margin: 14px;
    padding: 20px 18px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .2);
}

.mine-hero h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.mine-hero p {
    margin: 0;
    font-size: 13px;
    opacity: .86;
}

.mine-menu {
    margin: 0 14px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.mine-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 16px;
    border-bottom: 1px solid #f2f4f8;
    font-size: 15px;
}

.mine-menu a:last-child {
    border-bottom: 0;
}

.mine-menu a::after {
    content: "›";
    color: #b6bdc9;
    font-size: 20px;
    line-height: 1;
}

.mine-menu .menu-desc {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

/* 登录页 */
.page-auth {
    background: #0f172a;
}

.page-auth .app {
    padding-bottom: 0;
    background: #0f172a;
}

.auth-screen {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.auth-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .86;
}

.auth-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 20, 44, .1) 0%, rgba(9, 20, 44, .58) 100%);
}

.auth-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 100vh;
    padding: 80px 22px 40px;
}

.auth-title {
    margin: 0 0 18px;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.auth-card {
    padding: 20px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}

.auth-tabs {
    display: flex;
    gap: 22px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.auth-tab {
    position: relative;
    padding: 4px 0 10px;
    border: 0;
    background: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}

.auth-tab.active {
    color: var(--primary-deep);
}

.auth-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
}

.auth-input {
    width: 100%;
    height: 48px;
    margin-bottom: 12px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    outline: none;
}

.auth-input:focus {
    border-color: #bcd0ff;
}

.auth-submit {
    width: 100%;
    height: 48px;
    margin-top: 6px;
    border: 0;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.auth-links {
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.auth-links a {
    color: var(--primary-deep);
}

.auth-back {
    position: absolute;
    top: 18px;
    left: 16px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-size: 13px;
    backdrop-filter: blur(4px);
}

.hidden {
    display: none !important;
}

/* 信息卡片 / 结果 */
.info-card {
    margin: 14px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.info-card h3 {
    margin: 0 0 10px;
    font-size: 17px;
}

.info-card p {
    margin: 0 0 8px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.8;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.result-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #eaf8ee;
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
}

.result-title {
    margin: 0 0 6px;
    text-align: center;
    font-size: 18px;
}

.result-desc {
    margin: 0 0 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.guide-image {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.media-card {
    margin: 14px;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.media-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.media-card .media-body {
    padding: 14px 16px 16px;
}

.media-card .media-body p {
    margin: 0 0 12px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.8;
}

.empty {
    margin: 40px 14px;
    padding: 40px 16px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 14px;
}

/* 底部导航 */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 40;
    display: flex;
    width: 100%;
    max-width: 480px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    backdrop-filter: blur(10px);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 0 6px;
    color: #8a93a3;
    font-size: 11px;
}

.tab-item.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-svg {
    width: 22px;
    height: 22px;
}

/* 兼容小屏 */
@media (max-width: 360px) {
    .service-grid {
        gap: 10px 2px;
    }

    .service-item img {
        width: 36px;
        height: 36px;
    }

    .action-card img {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 340px) {
    .action-card-text strong {
        font-size: 13px;
    }

    .action-card img {
        width: 38px;
        height: 38px;
    }
}
