:root {
    --sidebar-width: 236px;
    --bg: #f1f3f2;
    --surface: #ffffff;
    --surface-muted: #f7f9f8;
    --border: #d9dfdc;
    --border-strong: #c5ceca;
    --text: #18231f;
    --muted: #68736f;
    --primary: #0d6b57;
    --primary-dark: #084f42;
    --primary-soft: #e4f0ec;
    --accent: #b48842;
    --sidebar: #131c1a;
    --sidebar-hover: #1d2926;
    --danger: #b33d42;
    --shadow-sm: 0 1px 2px rgba(19, 32, 28, .05);
    --shadow-md: 0 12px 30px rgba(19, 32, 28, .08);
}

.site-icp-link {
    position: fixed;
    left: 50%;
    bottom: 10px;
    z-index: 1040;
    transform: translateX(-50%);
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .9);
    color: #6b7470;
    font-size: 12px;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(19, 32, 28, .08);
}

.site-icp-link:hover {
    color: var(--primary);
}

.page-heading-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-heading-actions form {
    margin: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.checkin-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 16px;
}

.checkin-generator,
.site-checkin-control {
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.checkin-generator {
    padding: 22px;
}

.checkin-section-heading,
.checkin-records-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.checkin-section-heading h2,
.checkin-records-heading h2 {
    margin: 0;
    font-size: 18px;
}

.checkin-section-heading p,
.checkin-records-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.checkin-section-heading > i {
    color: var(--primary);
    font-size: 34px;
}

.checkin-window-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
    align-items: end;
    gap: 12px;
}

.site-checkin-control {
    display: grid;
    grid-template-columns: minmax(310px, 38%) minmax(0, 1fr);
    overflow: hidden;
}

.site-checkin-qr {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    background: #f4f8f7;
    border-right: 1px solid var(--border);
}

.site-checkin-qr img {
    width: min(100%, 360px);
    aspect-ratio: 1;
    object-fit: contain;
    background: #fff;
    border: 10px solid #fff;
}

.site-checkin-qr strong {
    margin-top: 12px;
    color: #173e34;
    font-size: 18px;
}

.site-checkin-qr span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.site-checkin-details {
    min-width: 0;
    padding: 24px;
}

.checkin-status-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.checkin-status-line > span:last-child {
    color: var(--muted);
    font-size: 13px;
}

.site-checkin-details dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
    margin: 0 0 18px;
}

.site-checkin-details dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.site-checkin-details dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.checkin-public-url {
    max-width: 100%;
    margin-bottom: 14px;
}

.checkin-qr-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.checkin-qr-actions form {
    margin: 0;
}

.checkin-regenerate {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.checkin-regenerate summary {
    color: #59656e;
    cursor: pointer;
    font-size: 13px;
}

.checkin-regenerate .checkin-window-form {
    margin-top: 14px;
}

.checkin-records {
    margin-top: 18px;
}

.checkin-records-heading > span {
    flex: 0 0 auto;
    color: #14624f;
    font-size: 13px;
    font-weight: 600;
}

.checkin-void-form {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 180px;
}

.checkin-record-mobile article {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.checkin-record-mobile article:last-child {
    border-bottom: 0;
}

.checkin-record-mobile article > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.checkin-record-mobile article p {
    margin: 8px 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.checkin-qr-modal .modal-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.checkin-qr-modal .modal-body {
    min-height: 390px;
}

.checkin-qr-loading {
    display: flex;
    min-height: 340px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    color: var(--muted);
}

#checkinQrContent {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

#checkinQrContent img {
    width: min(100%, 310px);
    aspect-ratio: 1;
    object-fit: contain;
    background: #fff;
}

#checkinQrContent > strong {
    margin-top: 8px;
    color: #173e34;
    font-size: 18px;
}

#checkinQrContent > span {
    margin: 4px 0 14px;
    color: var(--muted);
    font-size: 13px;
}

#checkinQrContent .copy-value {
    width: 100%;
    text-align: left;
}

.site-checkin-public-page {
    background: #eef4f2;
}

.site-checkin-public {
    max-width: 520px;
}

.site-checkin-public-content {
    padding: 6px 20px 20px;
}

.site-checkin-public-content h2 {
    margin: 8px 0 16px;
    font-size: 23px;
}

.site-checkin-submit {
    display: flex;
    width: 100%;
    min-height: 86px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 26px;
    padding: 15px 20px;
    color: #fff;
    background: #168064;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(19, 104, 81, .18);
}

.site-work-status {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding: 14px;
    background: #f4f7f6;
    border: 1px solid #dce7e3;
    border-radius: 8px;
}

.site-work-status > div {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
}

.site-work-status span {
    color: var(--muted);
    font-size: 13px;
}

.site-work-status strong {
    overflow-wrap: anywhere;
    font-size: 14px;
}

.site-checkin-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.checkin-camera {
    display: grid;
    gap: .75rem;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--border-color, #dbe3ec);
    border-radius: .85rem;
    background: #f8fafc;
}

.checkin-camera-heading { display: flex; gap: .7rem; align-items: flex-start; }
.checkin-camera-heading > i { color: #2563eb; font-size: 1.35rem; }
.checkin-camera-heading div { display: grid; gap: .2rem; }
.checkin-camera-heading span { color: #64748b; font-size: .9rem; }
.checkin-camera video, .checkin-photo-preview { width: min(100%, 420px); border-radius: .65rem; background: #0f172a; }
.checkin-photo-preview { max-height: 280px; object-fit: contain; }
.checkin-photo-links { display: flex; gap: .45rem; flex-wrap: wrap; }

.site-checkin-actions form {
    min-width: 0;
}

.site-checkin-action {
    display: flex;
    width: 100%;
    min-height: 92px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 10px;
    color: #fff;
    border: 0;
    border-radius: 8px;
}

.site-checkin-action.sign-in {
    background: #168064;
}

.site-checkin-action.sign-out {
    background: #44515a;
}

.site-checkin-action:disabled {
    color: #778087;
    background: #e2e6e8;
    cursor: not-allowed;
}

.site-checkin-action > i {
    flex: 0 0 auto;
    font-size: 29px;
}

.site-checkin-action span,
.site-checkin-action strong,
.site-checkin-action small {
    display: block;
    min-width: 0;
}

.site-checkin-action strong {
    font-size: 19px;
}

.site-checkin-action small {
    margin-top: 2px;
    color: inherit;
    font-size: 12px;
    opacity: .82;
}

.planned-days-form {
    margin-top: 20px;
}

.planned-days-form > label {
    display: block;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
}

.planned-days-input {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 36px 54px;
    align-items: center;
    overflow: hidden;
    border: 1px solid #cbd9d4;
    border-radius: 8px;
}

.planned-days-input button {
    height: 56px;
    color: #176b56;
    background: #edf6f2;
    border: 0;
    font-size: 24px;
}

.planned-days-input input {
    width: 100%;
    height: 56px;
    padding: 0 8px;
    text-align: center;
    border: 0;
    outline: 0;
    font-size: 24px;
    font-weight: 700;
}

.planned-days-quick {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.planned-days-quick button {
    min-height: 42px;
    padding: 6px 4px;
    color: #285b4e;
    background: #fff;
    border: 1px solid #cbd9d4;
    border-radius: 6px;
    font-size: 13px;
}

.planned-days-form > p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.my-jobs-entry {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.site-work-totals {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 10px;
    color: #315d52;
    font-size: 14px;
    font-weight: 600;
}

.my-jobs-page {
    align-items: flex-start;
}

.my-jobs-shell {
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 22px 14px 40px;
}

.my-jobs-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.my-jobs-header > span {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    place-items: center;
    color: #fff;
    background: #176b56;
    border-radius: 8px;
    font-size: 25px;
}

.my-jobs-header h1 {
    margin: 0;
    font-size: 24px;
}

.my-jobs-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.my-jobs-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid #dbe5e1;
    border-radius: 8px;
}

.my-jobs-summary > div {
    display: grid;
    min-height: 76px;
    place-content: center;
    text-align: center;
}

.my-jobs-summary > div + div {
    border-left: 1px solid #e3ebe8;
}

.my-jobs-summary strong {
    color: #176b56;
    font-size: 24px;
}

.my-jobs-summary span {
    color: var(--muted);
    font-size: 13px;
}

.my-jobs-list {
    display: grid;
    gap: 12px;
}

.my-job-item {
    padding: 16px;
    background: #fff;
    border: 1px solid #dbe5e1;
    border-radius: 8px;
}

.my-job-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.my-job-heading h2 {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    font-size: 19px;
}

.my-job-heading > div > span {
    color: var(--muted);
    font-size: 13px;
}

.my-job-status {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.my-job-status.active {
    color: #0f684f;
    background: #e4f3ed;
}

.my-job-status.completed {
    color: #687077;
    background: #edf0f1;
}

.my-job-item dl {
    display: grid;
    gap: 7px;
    margin: 14px 0 0;
}

.my-job-item dl > div {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
}

.my-job-item dt {
    color: var(--muted);
    font-weight: 400;
}

.my-job-item dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 600;
}

.my-job-working,
.my-job-completed {
    margin-top: 12px;
    padding: 10px 12px;
    background: #edf6f2;
    border-radius: 6px;
    color: #176b56;
}

.my-job-completed {
    display: grid;
    color: #5e676c;
    background: #f1f3f4;
}

.my-job-completed small {
    margin-top: 2px;
}

.complete-job-panel {
    margin-top: 14px;
    border-top: 1px solid #e2e9e6;
}

.complete-job-panel summary {
    padding: 13px 0 0;
    color: #6a4b47;
    cursor: pointer;
    font-weight: 700;
}

.complete-job-panel form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.complete-job-panel .btn {
    min-height: 48px;
}

.my-jobs-empty {
    display: grid;
    min-height: 180px;
    place-content: center;
    text-align: center;
    color: var(--muted);
}

.my-jobs-empty i {
    font-size: 34px;
}

.my-jobs-shell > footer {
    margin-top: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 520px) {
    .planned-days-quick {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .my-jobs-shell {
        padding-top: 16px;
    }
}

.site-checkin-message {
    font-size: 14px;
}

.site-checkin-submit > i {
    flex: 0 0 auto;
    font-size: 34px;
}

.site-checkin-submit span,
.site-checkin-submit strong,
.site-checkin-submit small {
    display: block;
}

.site-checkin-submit strong {
    font-size: 20px;
}

.site-checkin-submit small {
    margin-top: 2px;
    color: #d8f3eb;
    font-size: 13px;
}

.site-checkin-notice {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.wechat-scan-required {
    padding: 44px 28px 56px;
    text-align: center;
}

.wechat-scan-required > i {
    display: block;
    color: #168064;
    font-size: 62px;
}

.wechat-scan-required h2 {
    margin: 18px 0 8px;
    font-size: 24px;
}

.wechat-scan-required p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.site-checkin-result time {
    display: block;
    margin-top: 18px;
    color: #14624f;
    font-size: 15px;
    font-weight: 600;
}

@media (max-width: 900px) {
    .checkin-window-form {
        grid-template-columns: 1fr 1fr;
    }

    .checkin-window-form > .btn {
        grid-column: 1 / -1;
    }

    .site-checkin-control {
        grid-template-columns: minmax(260px, 42%) minmax(0, 1fr);
    }
}

@media (max-width: 767.98px) {
    .page-heading-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading-actions .btn {
        width: 100%;
    }

    .checkin-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .checkin-generator {
        padding: 16px;
    }

    .checkin-window-form,
    .site-checkin-control {
        grid-template-columns: 1fr;
    }

    .site-checkin-qr {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .site-checkin-qr img {
        width: min(100%, 300px);
    }

    .site-checkin-details {
        padding: 18px 16px;
    }

    .site-checkin-details dl {
        grid-template-columns: 1fr;
    }

    .checkin-qr-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .checkin-qr-actions > .btn,
    .checkin-qr-actions form,
    .checkin-qr-actions form .btn {
        width: 100%;
    }

    .checkin-void-form {
        min-width: 0;
    }

    .site-checkin-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media print {
    .site-checkin-admin > * {
        display: none !important;
    }

    .app-layout,
    .app-main,
    .app-content {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .app-sidebar,
    .app-topbar {
        display: none !important;
    }

    .site-checkin-admin .site-checkin-control {
        display: block !important;
        border: 0;
    }

    .site-checkin-admin .site-checkin-qr {
        display: flex !important;
        min-height: 90vh;
        border: 0;
        background: #fff;
    }

    .site-checkin-admin .site-checkin-details {
        display: none !important;
    }
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

.app-layout {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    color: #f6f8f9;
    background: var(--sidebar);
    z-index: 1050;
    overflow-y: auto;
}

.mobile-sidebar-header,
.mobile-sidebar-backdrop {
    display: none;
}

.mobile-sidebar-close {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 0;
    color: #d8dee2;
    background: transparent;
    font-size: 20px;
}

.sidebar-brand {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: var(--primary);
    border-radius: 8px;
    font-size: 19px;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.sidebar-brand small {
    margin-top: 2px;
    color: #aeb8bf;
    font-size: 12px;
}

.sidebar-nav {
    display: grid;
    gap: 3px;
    padding: 14px 10px 24px;
}

.sidebar-nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    color: #cbd3d8;
    text-decoration: none;
    border-radius: 6px;
}

.sidebar-nav a:hover {
    color: #fff;
    background: var(--sidebar-hover);
}

.sidebar-nav a.active {
    color: #fff;
    background: var(--primary);
}

.sidebar-nav i {
    width: 20px;
    text-align: center;
    font-size: 17px;
}

.app-main {
    min-width: 0;
    margin-left: var(--sidebar-width);
}

.app-topbar {
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-title {
    flex: 1;
    min-width: 0;
    font-weight: 700;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
}

.topbar-user form,
.actions form {
    margin: 0;
}

.user-avatar {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #fff;
    background: #40525e;
    border-radius: 50%;
}

.btn {
    min-height: 44px;
    padding: 0.6rem 1rem;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
}

.btn i {
    font-size: 17px;
}

.btn-sm {
    min-height: 40px;
    padding: 0.48rem 0.78rem;
    font-size: 14px;
}

.btn-icon {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    color: #52606a;
    background: transparent;
}

.btn-icon.btn-sm {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
}

.btn-icon i {
    font-size: 19px;
}

.btn-icon:hover {
    color: var(--primary);
    background: #edf3f1;
}

.btn-icon:focus-visible {
    color: var(--primary);
    background: #edf3f1;
    outline: 3px solid rgba(20, 112, 89, 0.22);
    outline-offset: 2px;
}

.tooltip {
    --bs-tooltip-max-width: 280px;
    --bs-tooltip-opacity: 0.96;
}

.tooltip-inner {
    padding: 8px 11px;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.4;
}

.app-content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.page-heading h1 {
    margin: 0;
    font-size: 25px;
    line-height: 1.3;
}

.page-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.metric-item {
    min-height: 108px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.metric-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 21px;
}

.tone-0 { color: #176b57; background: #dff1eb; }
.tone-1 { color: #285f9d; background: #e2edf8; }
.tone-2 { color: #8a5a13; background: #f6ecd7; }
.tone-3 { color: #8c3f58; background: #f5e5eb; }
.tone-4 { color: #17636b; background: #dff1f2; }
.tone-5 { color: #684a93; background: #eee7f7; }

.metric-item span,
.metric-item strong {
    display: block;
}

.metric-item span {
    color: var(--muted);
    font-size: 13px;
}

.metric-item strong {
    margin-top: 4px;
    font-size: 26px;
}

.quick-section {
    margin-top: 24px;
}

.section-title h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.quick-link {
    min-height: 54px;
    display: grid;
    grid-template-columns: 24px 1fr 18px;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 7px;
    text-decoration: none;
}

.quick-link:hover {
    color: var(--primary);
    border-color: #9ebdb5;
}

.dashboard-content {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

.dashboard-heading {
    align-items: center;
}

.dashboard-period {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.dashboard-period i {
    margin-right: 5px;
}

.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-metric {
    min-width: 0;
    padding: 16px;
}

.dashboard-metric .metric-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
}

.dashboard-metric > div:last-child {
    min-width: 0;
}

.dashboard-metric strong {
    font-size: 24px;
    line-height: 1.15;
}

.dashboard-metric small {
    display: block;
    margin-top: 4px;
    color: #8a949d;
    font-size: 11px;
}

.dashboard-chart-grid,
.dashboard-lower-grid {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.dashboard-chart-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr);
}

.dashboard-lower-grid {
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.7fr);
}

.dashboard-panel {
    min-width: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.dashboard-panel-header {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
}

.dashboard-panel-header h2 {
    margin: 0;
    font-size: 16px;
}

.dashboard-panel-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.panel-link {
    flex: 0 0 auto;
    color: var(--primary);
    font-size: 12px;
    text-decoration: none;
}

.panel-link:hover {
    color: var(--primary-dark);
}

.chart-legend {
    display: flex;
    gap: 14px;
    color: var(--muted);
    font-size: 12px;
}

.chart-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-legend i {
    width: 9px;
    height: 9px;
    border-radius: 2px;
}

.legend-worker { background: #29806c; }
.legend-signup { background: #d59b3a; }

.trend-chart {
    position: relative;
    height: 260px;
    display: grid;
    grid-template-columns: repeat(7, minmax(42px, 1fr));
    gap: 12px;
    padding: 34px 22px 16px;
}

.trend-grid-lines {
    position: absolute;
    inset: 34px 22px 39px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.trend-grid-lines i {
    width: 100%;
    border-top: 1px dashed #e5e9ec;
}

.trend-group {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: grid;
    grid-template-rows: 20px minmax(0, 1fr) 20px;
    gap: 4px;
}

.trend-values,
.trend-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
}

.trend-values span {
    width: 18px;
    color: #6f7a83;
    font-size: 10px;
    text-align: center;
}

.trend-bar {
    width: min(17px, 38%);
    min-height: 0;
    border-radius: 3px 3px 0 0;
    transition: opacity .15s ease;
}

.trend-group:hover .trend-bar {
    opacity: .78;
}

.trend-worker { background: #29806c; }
.trend-signup { background: #d59b3a; }

.trend-label {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
}

.funnel-chart {
    display: grid;
    gap: 20px;
    padding: 22px 20px 24px;
}

.funnel-meta,
.work-type-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
    font-size: 13px;
}

.funnel-meta strong,
.work-type-meta strong {
    color: #35414a;
    font-size: 13px;
}

.funnel-track,
.work-type-track {
    height: 9px;
    overflow: hidden;
    background: #edf0f2;
    border-radius: 3px;
}

.funnel-fill,
.work-type-track i {
    display: block;
    height: 100%;
    border-radius: 3px;
}

.funnel-target { background: #557b9f; }
.funnel-delivered { background: #29806c; }
.funnel-opened { background: #d59b3a; }
.funnel-signed { background: #b44f71; }

.work-type-chart {
    display: grid;
    gap: 17px;
    padding: 20px 18px 23px;
}

.work-type-track i {
    background: #29806c;
}

.dashboard-table-wrap {
    overflow-x: auto;
}

.dashboard-table {
    min-width: 780px;
    margin: 0;
}

.dashboard-table th {
    padding: 11px 12px;
    color: #66717a;
    background: #fafbfb;
    border-bottom-width: 1px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-table td {
    max-width: 180px;
    padding: 11px 12px;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-table td strong {
    font-size: 13px;
}

.signup-title-cell {
    max-width: 210px !important;
}

.signup-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
}

.signup-status.signed {
    color: #176b57;
    background: #dff1eb;
}

.signup-status.cancelled {
    color: #7a555e;
    background: #f2e8eb;
}

.dashboard-empty {
    min-height: 210px;
    display: grid;
    place-content: center;
    gap: 8px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.dashboard-empty i {
    font-size: 28px;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.search-form {
    width: min(440px, 100%);
}

.import-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-form input {
    width: 220px;
}

.table-shell,
.data-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.data-table {
    min-width: 980px;
    margin: 0;
}

.data-table th {
    padding: 12px;
    color: #53606a;
    background: #f8f9fa;
    border-bottom-width: 1px;
    font-size: 13px;
    white-space: nowrap;
}

.data-table td {
    max-width: 220px;
    padding: 11px 12px;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-column {
    width: 190px;
}

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

.empty-state {
    height: 220px;
    text-align: center;
    color: var(--muted);
}

.empty-state i,
.empty-state span {
    display: block;
}

.empty-state i {
    margin-bottom: 8px;
    font-size: 30px;
}

.data-form {
    padding: 22px;
}

.wechat-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.wechat-summary > a {
    position: relative;
    display: block;
    min-width: 0;
    padding: 15px 18px;
    border-right: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

.wechat-summary > a:last-child {
    border-right: 0;
}

.wechat-summary > a:hover,
.wechat-summary > a:focus-visible {
    background: #f3faf7;
    box-shadow: inset 0 -3px 0 var(--primary);
    outline: none;
}

.wechat-summary > a > i {
    position: absolute;
    top: 50%;
    right: 16px;
    color: var(--muted);
    transform: translateY(-50%);
}

.wechat-summary span,
.wechat-summary strong {
    display: block;
}

.wechat-summary span {
    color: var(--muted);
    font-size: 12px;
}

.wechat-summary strong {
    margin-top: 3px;
    font-size: 22px;
}

.wechat-search {
    width: min(720px, 100%);
}

.wechat-detail-search {
    width: min(980px, 100%);
}

.wechat-detail-search .form-select {
    max-width: 210px;
}

.wechat-detail-table {
    min-width: 1080px;
}

.breakable-code {
    overflow-wrap: anywhere;
    white-space: normal;
}

.record-details {
    min-width: 130px;
}

.record-details summary {
    color: var(--primary);
    cursor: pointer;
    font-weight: 600;
}

.record-details pre {
    width: min(520px, 70vw);
    max-height: 280px;
    margin: 10px 0 0;
    padding: 12px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f7f9fa;
    color: var(--text);
    font: 12px/1.6 Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.record-example {
    margin-top: 12px;
}

.wechat-search .form-select {
    max-width: 160px;
}

.wechat-account-table {
    min-width: 1120px;
}

.wechat-account-list {
    scroll-margin-top: 88px;
}

.account-name {
    font-weight: 700;
}

.cell-secondary {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.copy-value {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.copy-value code,
.copy-value > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.callback-value {
    max-width: 300px;
}

.copy-button {
    flex: 0 0 auto;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-success {
    color: #14624f;
    background: #ddf1eb;
}

.status-muted {
    color: #5e6871;
    background: #edf0f2;
}

.wechat-actions {
    min-width: 152px;
}

.wechat-form {
    padding-top: 0;
}

.form-section {
    padding: 22px 0;
    border-bottom: 1px solid var(--border);
}

.form-section:first-child {
    padding-top: 22px;
}

.form-section-heading {
    margin-bottom: 16px;
}

.form-section-heading h2 {
    margin: 0;
    font-size: 17px;
}

.form-section-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.secret-input .btn {
    width: 42px;
}

.callback-preview {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 6px 6px 12px;
    background: #f7f9fa;
    border: 1px solid #cfd6dc;
    border-radius: 5px;
}

.callback-preview code {
    min-width: 0;
    overflow-wrap: anywhere;
}

.advanced-config {
    padding: 12px 14px;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.advanced-config summary {
    color: #46525b;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.registration-link-table {
    min-width: 1360px;
}

.registration-url {
    max-width: 320px;
}

.registration-link-form {
    display: grid;
    gap: 15px;
}

.registration-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(110px, .5fr);
    gap: 12px;
}

.work-type-choices {
    max-height: 190px;
    overflow-y: auto;
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 5px;
}

.work-type-choice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
}

.work-type-choice:hover {
    background: #edf3f1;
}

.work-type-choice input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.work-type-choice strong,
.work-type-choice small {
    display: block;
}

.work-type-choice small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.work-type-empty {
    padding: 16px 8px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.worker-resource-work-types {
    max-height: 260px;
}

.worker-resource-work-type {
    align-items: center;
    justify-content: space-between;
    cursor: default;
}

.worker-work-type-check,
.worker-primary-choice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    cursor: pointer;
}

.worker-work-type-check {
    flex: 1 1 auto;
    min-width: 0;
}

.worker-primary-choice {
    flex: 0 0 auto;
    align-items: center;
    padding: 5px 7px;
    color: #42524e;
    font-size: 13px;
}

.worker-register-page {
    min-height: 100vh;
    background: #eef2f3;
}

.worker-register-shell {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 28px 18px 36px;
}

.worker-register-header {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
}

.registration-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: var(--primary);
    border-radius: 8px;
    font-size: 22px;
}

.worker-register-header h1 {
    margin: 0;
    font-size: 23px;
}

.worker-register-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.worker-register-form {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.worker-register-form section {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.worker-register-form h2 {
    margin: 0 0 15px;
    font-size: 16px;
}

.public-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.public-field-wide {
    grid-column: 1 / -1;
}

.registration-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 18px 20px 0;
    color: #4f5c65;
    font-size: 13px;
    line-height: 1.55;
}

.registration-consent input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.worker-register-submit {
    width: calc(100% - 40px);
    min-height: 44px;
    margin: 18px 20px 20px;
}

.worker-register-shell footer {
    padding-top: 16px;
    color: #8a949c;
    text-align: center;
    font-size: 12px;
}

.simple-register-shell {
    width: min(560px, 100%);
    padding-top: 22px;
}

.simple-register-header {
    margin-bottom: 16px;
}

.simple-register-header h1 {
    font-size: 26px;
}

.simple-register-header p {
    font-size: 16px;
}

.registration-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
}

.simple-register-form {
    overflow: visible;
}

.simple-register-fields {
    display: grid;
    gap: 22px;
    padding: 22px !important;
}

.simple-form-field {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.simple-form-field .form-label {
    margin-bottom: 9px;
    color: #202a31;
    font-size: 18px;
    font-weight: 700;
}

.simple-form-field .form-control {
    min-height: 54px;
    padding: 10px 14px;
    border-width: 2px;
    font-size: 18px;
}

.simple-form-field .form-control::placeholder {
    color: #7a858d;
}

.gender-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.gender-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.gender-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gender-option span {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #344047;
    background: #f7f9fa;
    border: 2px solid #c5cdd2;
    border-radius: 7px;
    font-size: 18px;
    font-weight: 700;
}

.gender-option input:checked + span {
    color: #075f4c;
    background: #e4f3ee;
    border-color: #16836a;
}

.gender-option input:focus-visible + span {
    outline: 3px solid rgba(22, 131, 106, .24);
    outline-offset: 2px;
}

.field-hint {
    margin: -3px 0 12px;
    color: #66727a;
    font-size: 15px;
    line-height: 1.5;
}

.skill-tag-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag-option {
    position: relative;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: #344047;
    background: #f7f9fa;
    border: 2px solid #c5cdd2;
    border-radius: 7px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
}

.skill-tag-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.skill-tag-option i {
    display: none;
}

.skill-tag-option.selected {
    color: #075f4c;
    background: #e4f3ee;
    border-color: #16836a;
}

.skill-tag-option.selected i {
    display: inline-block;
}

.skill-tag-option:focus-within {
    outline: 3px solid rgba(22, 131, 106, .24);
    outline-offset: 2px;
}

.skill-required-message {
    margin: 10px 0 0;
    color: #b42318;
    font-size: 15px;
    font-weight: 700;
}

.simple-registration-consent {
    min-height: 48px;
    align-items: center;
    margin-top: 16px;
    font-size: 15px;
}

.simple-registration-consent input {
    width: 22px;
    height: 22px;
    margin-top: 0;
}

.personal-information-notice {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
    line-height: 1.7;
}

.personal-information-notice summary {
    cursor: pointer;
    color: #175cd3;
    font-weight: 700;
}

.personal-information-notice-body p {
    margin: 8px 0 0;
}

.simple-register-submit {
    min-height: 56px;
    font-size: 19px;
    font-weight: 700;
}

.registration-result {
    width: min(420px, calc(100% - 32px));
    margin: 15vh auto 0;
    padding: 34px 26px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.registration-result-icon {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 50%;
    font-size: 27px;
}

.registration-result-icon.success {
    color: #176b57;
    background: #dff1eb;
}

.registration-result-icon.unavailable {
    color: #69737d;
    background: #e8ecef;
}

.registration-result h1 {
    margin: 0;
    font-size: 22px;
}

.registration-result p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-label {
    margin-bottom: 6px;
    color: #4c5963;
    font-size: 13px;
    font-weight: 600;
}

.required {
    color: #c73535;
}

.form-control,
.form-select,
.input-group-text {
    border-color: #cfd6dc;
    border-radius: 5px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.alert-stack {
    position: fixed;
    top: 74px;
    right: 22px;
    z-index: 1080;
    width: min(420px, calc(100vw - 44px));
}

.login-page {
    min-height: 100vh;
    background: #e9eef0;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(420px, 100%);
    padding: 32px;
    background: #fff;
    border: 1px solid #d5dde1;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(31, 41, 48, .12);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 28px;
}

.login-brand h1 {
    margin: 0;
    font-size: 22px;
}

.login-brand p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 1399.98px) {
    .dashboard-metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        width: min(86vw, 360px);
        transform: translateX(-100%);
        transition: transform .18s ease;
        box-shadow: 18px 0 40px rgba(0, 0, 0, .24);
    }

    .app-main {
        margin-left: 0;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .mobile-sidebar-header {
        height: 72px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px 0 20px;
        border-bottom: 1px solid rgba(255, 255, 255, .1);
    }

    .mobile-sidebar-title {
        margin: 0;
        color: #f6f8f9;
        font-size: 18px;
        font-weight: 700;
    }

    .mobile-sidebar-backdrop {
        position: fixed;
        inset: 0;
        left: min(86vw, 360px);
        display: block;
        pointer-events: none;
        background: rgba(0, 0, 0, .45);
        opacity: 0;
        transition: opacity .18s ease;
    }

    body.sidebar-open .mobile-sidebar-backdrop {
        pointer-events: auto;
        opacity: 1;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-chart-grid,
    .dashboard-lower-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .quick-grid,
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wechat-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wechat-summary > a:nth-child(2) {
        border-right: 0;
    }

    .wechat-summary > a:nth-child(-n+2) {
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 575.98px) {
    .app-topbar {
        height: 58px;
        padding: 0 12px;
    }

    .app-content {
        padding: 16px 12px 28px;
    }

    .page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading .btn {
        align-self: flex-start;
    }

    .heading-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .heading-actions .btn {
        width: 100%;
    }

    .metric-grid,
    .dashboard-metric-grid,
    .quick-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-period {
        white-space: normal;
    }

    .dashboard-panel-header {
        align-items: flex-start;
        padding: 14px;
    }

    .chart-legend {
        gap: 8px;
        flex-direction: column;
    }

    .trend-chart {
        height: 230px;
        gap: 4px;
        padding: 30px 10px 14px;
    }

    .trend-grid-lines {
        inset: 30px 10px 37px;
    }

    .trend-values,
    .trend-bars {
        gap: 2px;
    }

    .trend-values span {
        width: 14px;
        font-size: 9px;
    }

    .trend-label {
        font-size: 10px;
    }

    .toolbar,
    .import-form {
        align-items: stretch;
        flex-direction: column;
    }

    .import-form,
    .import-form input {
        width: 100%;
    }

    .wechat-summary {
        grid-template-columns: 1fr 1fr;
    }

    .wechat-search .input-group {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .wechat-search .input-group-text {
        border-radius: 5px 0 0 5px;
    }

    .wechat-search .form-control {
        width: 100%;
        border-radius: 0 5px 5px 0 !important;
    }

    .wechat-search .form-select,
    .wechat-search .btn {
        width: 100%;
        max-width: none;
        grid-column: 1 / -1;
        margin-top: 8px !important;
        border-radius: 5px !important;
    }

    .data-form {
        padding: 16px;
    }

    .login-panel {
        padding: 24px 20px;
    }

    .registration-form-row,
    .public-form-grid {
        grid-template-columns: 1fr;
    }

    .public-field-wide {
        grid-column: auto;
    }

    .worker-register-shell {
        padding: 20px 12px 28px;
    }

    .worker-register-form section {
        padding: 18px 15px;
    }

    .simple-register-fields {
        gap: 20px;
        padding: 20px 16px !important;
    }

    .registration-consent {
        margin-right: 15px;
        margin-left: 15px;
    }

    .worker-register-submit {
        width: calc(100% - 30px);
        margin-right: 15px;
        margin-left: 15px;
    }
}

.shift-preference-picker {
    display: grid;
    gap: 10px;
}

.shift-preference-option {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 14px;
    border: 2px solid #d8dfdc;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.shift-preference-option[hidden] {
    display: none;
}

.shift-preference-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.shift-preference-option > i {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border: 2px solid #aab5b1;
    border-radius: 50%;
    color: transparent;
    font-size: 18px;
}

.shift-preference-option span {
    display: grid;
    gap: 2px;
}

.shift-preference-option strong {
    font-size: 17px;
    color: #202724;
}

.shift-preference-option small {
    font-size: 14px;
    color: #626d69;
}

.shift-preference-option.selected {
    border-color: #08785c;
    background: #f1f8f5;
}

.shift-preference-option.selected > i {
    border-color: #08785c;
    background: #08785c;
    color: #fff;
}

.job-push-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.job-push-span-2 {
    grid-column: 1 / -1;
}

.template-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.push-mode-control .btn {
    min-width: 140px;
}

.back-link {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 10px;
    color: #33635a;
    text-decoration: none;
}

.job-push-metrics {
    margin-bottom: 18px;
}

.job-push-summary {
    padding: 20px 0 24px;
    border-top: 1px solid #e2e8e6;
}

.job-push-summary dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 16px;
}

.job-push-summary dt {
    margin-bottom: 4px;
    color: #66736f;
    font-size: 13px;
    font-weight: 500;
}

.job-push-summary dd {
    margin: 0;
    font-weight: 600;
}

.job-push-tabs {
    margin-bottom: 0;
}

.job-push-tabs + .tab-content .table-shell {
    border-top: 0;
}

.response-message {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-signup-shell {
    max-width: 620px;
}

.job-signup-content {
    padding: 22px 20px;
}

.job-signup-content h2 {
    margin-bottom: 16px;
    font-size: 24px;
    line-height: 1.35;
}

.job-signup-worker,
.job-signup-deadline,
.job-already-signed {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px;
    border-radius: 6px;
    background: #edf7f3;
    color: #174f43;
    font-size: 17px;
}

.job-signup-facts {
    margin: 18px 0;
}

.job-signup-facts > div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #e4e8e6;
}

.job-signup-facts dt,
.job-signup-facts dd {
    margin: 0;
    font-size: 17px;
}

.job-signup-description {
    margin: 18px 0;
    color: #283532;
    font-size: 17px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.job-already-signed {
    margin: 0 20px 20px;
    justify-content: center;
}

.job-signup-result {
    padding: 52px 24px;
    text-align: center;
}

.job-signup-result .result-icon {
    color: #16866e;
    font-size: 64px;
}

.job-signup-result h1 {
    margin: 18px 0 10px;
    font-size: 30px;
}

.job-signup-result > div {
    display: grid;
    gap: 6px;
    margin: 28px 0;
    padding: 18px;
    background: #f2f5f4;
}

.job-signup-invalid .result-icon {
    color: #b45309;
}

@media (max-width: 767.98px) {
    .job-push-grid,
    .template-field-grid,
    .job-push-summary dl {
        grid-template-columns: 1fr;
    }

    .job-push-span-2 {
        grid-column: auto;
    }

    .job-signup-facts > div {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

.signup-record-summary {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin-bottom: 14px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.signup-record-summary > div {
    min-width: 0;
    padding: 16px 18px;
    border-right: 1px solid var(--border);
}

.signup-record-summary > div:last-child {
    border-right: 0;
}

.signup-record-summary span,
.signup-record-summary strong {
    display: block;
}

.signup-record-summary span {
    color: var(--muted);
    font-size: 12px;
}

.signup-record-summary strong {
    margin-top: 4px;
    font-size: 23px;
}

.summary-confirmed strong { color: #176b57; }
.summary-unavailable strong { color: #a2435f; }
.summary-pending strong { color: #8a5a13; }
.summary-checked-in strong { color: #14624f; }

.signup-record-filter {
    display: grid;
    grid-template-columns: minmax(230px, 1.5fr) repeat(4, minmax(130px, .8fr)) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.signup-record-filter .form-label {
    margin-bottom: 5px;
    color: #59656e;
    font-size: 12px;
}

.signup-filter-actions {
    display: flex;
    gap: 6px;
}

.signup-filter-actions .btn {
    white-space: nowrap;
}

.signup-record-table {
    min-width: 1320px;
}

.signup-record-table td {
    max-width: 240px;
}

.signup-record-table .signup-attendance-cell {
    width: 330px;
    min-width: 330px;
    max-width: 330px;
}

.signup-record-table th:last-child,
.signup-record-table td:last-child {
    width: 118px;
    min-width: 118px;
}

.cell-link {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--primary);
    font-size: 12px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signup-location-line {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    max-width: 220px;
    margin-top: 5px;
}

.signup-location-line i {
    flex: 0 0 auto;
    color: var(--accent);
}

.signup-location-line span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.attendance-event {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 6px;
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid #e6ebe8;
}

.attendance-event > i {
    color: #16735e;
    font-size: 15px;
}

.attendance-event > div strong,
.attendance-event > div span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendance-event > div strong {
    color: #26332f;
    font-size: 11px;
}

.attendance-event > div span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.attendance-event.checkout > i {
    color: #9a6b1e;
}

.attendance-event.pending-checkout {
    display: flex;
    align-items: center;
    color: #8b641f;
    font-size: 11px;
}

.attendance-event.pending-checkout > i {
    color: inherit;
}

.arrival-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
}

.arrival-status.confirmed {
    color: #176b57;
    background: #dff1eb;
}

.arrival-status.unavailable {
    color: #913d58;
    background: #f5e5eb;
}

.arrival-status.pending {
    color: #805719;
    background: #f6ecd7;
}

.arrival-status.expired {
    color: #606a72;
    background: #e9ecef;
}

.signup-record-mobile {
    padding: 10px;
}

.signup-record-card {
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.signup-record-card:last-child {
    border-bottom: 0;
}

.signup-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.signup-card-heading > div strong,
.signup-card-heading > div span {
    display: block;
}

.signup-card-heading > div span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.signup-record-card dl {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.signup-record-card dl > div {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
}

.signup-record-card dt,
.signup-record-card dd {
    margin: 0;
    font-size: 12px;
}

.signup-record-card dt {
    color: var(--muted);
    font-weight: 400;
}

.signup-record-card dd {
    overflow-wrap: anywhere;
}

.signup-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 14px;
}

.signup-pagination a {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #4d5962;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 5px;
    text-decoration: none;
}

.signup-pagination a.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.signup-pagination a.disabled {
    pointer-events: none;
    opacity: .45;
}

.signup-pagination > span {
    margin-left: 6px;
    color: var(--muted);
    font-size: 12px;
}

.arrival-confirm-shell {
    max-width: 560px;
}

.arrival-current {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 2px 10px;
    margin: 18px 0;
    padding: 15px;
    border-radius: 8px;
}

.arrival-current i {
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 25px;
}

.arrival-current strong,
.arrival-current span {
    display: block;
}

.arrival-current span {
    font-size: 12px;
}

.arrival-current.confirmed {
    color: #176b57;
    background: #e5f4ef;
}

.arrival-current.unavailable {
    color: #8b4057;
    background: #f6e9ed;
}

.arrival-choice-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.arrival-choice {
    min-height: 72px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid;
    border-radius: 8px;
    text-align: left;
}

.arrival-choice i {
    font-size: 28px;
}

.arrival-choice span,
.arrival-choice strong,
.arrival-choice small {
    display: block;
}

.arrival-choice small {
    margin-top: 3px;
    opacity: .75;
}

.arrival-choice.confirmed {
    color: #176b57;
    background: #f0f8f5;
    border-color: #83b8aa;
}

.arrival-choice.unavailable {
    color: #8b4057;
    background: #fbf3f5;
    border-color: #d3a0af;
}

.arrival-choice:hover,
.arrival-choice:focus {
    color: inherit;
    filter: brightness(.97);
}

.job-signup-result .result-icon.unavailable {
    color: #a2435f;
}

@media (max-width: 1199.98px) {
    .signup-record-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .signup-record-summary > div:nth-child(4) {
        border-right: 0;
    }

    .signup-record-summary > div:nth-child(-n+4) {
        border-bottom: 1px solid var(--border);
    }

    .signup-record-filter {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .filter-keyword {
        grid-column: span 2;
    }
}

@media (max-width: 575.98px) {
    .signup-record-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .signup-record-summary > div,
    .signup-record-summary > div:nth-child(4) {
        border-right: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
    }

    .signup-record-summary > div:nth-child(even) {
        border-right: 0;
    }

    .signup-record-summary > div:last-child {
        border-bottom: 0;
    }

    .signup-record-filter {
        grid-template-columns: 1fr;
    }

    .filter-keyword {
        grid-column: auto;
    }

    .signup-filter-actions .btn-primary {
        flex: 1;
    }

    .signup-pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
}
/* 高德选点与微信定位打卡 */
.job-location-picker {
    min-width: 0;
}

.job-location-map {
    width: 100%;
    height: 280px;
    margin-top: 10px;
    border: 1px solid #d6dce1;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f5f6;
}

.location-required-control {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-location-panel {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid #cfd8d5;
    border-radius: 8px;
    background: #f7faf9;
}

.site-location-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-location-heading > i {
    font-size: 28px;
    color: #08785c;
}

.site-location-heading div {
    display: grid;
    gap: 2px;
}

.site-location-heading strong {
    font-size: 17px;
}

.site-location-heading span,
.site-location-state {
    color: #56615e;
}

.worker-checkin-map {
    width: 100%;
    height: 180px;
    margin-top: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.site-navigation-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin-top: 8px;
    color: #08785c;
    font-weight: 600;
}

.site-location-state {
    margin: 8px 0 0;
    font-size: 15px;
    line-height: 1.55;
}

@media (max-width: 575.98px) {
    .job-location-map {
        height: 220px;
    }
}

/* Unified operations-console visual system. Keep business templates on one reusable layer. */
body {
    color: var(--text);
    background: var(--bg);
    font-family: "Segoe UI Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    color: #fff;
    background: var(--primary);
}

a,
button,
input,
select,
textarea {
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease,
                box-shadow 160ms ease, transform 160ms ease;
}

.app-sidebar {
    border-right: 1px solid #26332f;
    background: var(--sidebar);
    scrollbar-color: #40504b transparent;
    scrollbar-width: thin;
}

.sidebar-brand {
    height: 82px;
    gap: 13px;
    padding: 0 20px;
    border-bottom-color: rgba(255, 255, 255, .08);
}

.brand-mark {
    width: 38px;
    height: 38px;
    color: #17211e;
    background: #d2ae68;
    border-radius: 5px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
}

.sidebar-brand strong {
    color: #f7f8f7;
    font-size: 16px;
    font-weight: 700;
}

.sidebar-brand small {
    color: #8e9a96;
    font-size: 11px;
}

.sidebar-nav {
    gap: 2px;
    padding: 14px 10px 28px;
}

.sidebar-section-label {
    display: block;
    padding: 5px 12px 7px;
    color: #73807b;
    font-size: 10px;
    font-weight: 700;
}

.sidebar-section-label-spaced {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.sidebar-nav a {
    position: relative;
    min-height: 44px;
    gap: 11px;
    padding: 10px 12px;
    color: #b8c1be;
    border: 1px solid transparent;
    border-radius: 4px;
}

.sidebar-nav a:hover {
    color: #f5f7f6;
    background: var(--sidebar-hover);
    border-color: #293733;
}

.sidebar-nav a.active {
    color: #fff;
    background: #21312c;
    border-color: #2e433c;
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-nav a.active::after {
    position: absolute;
    right: 11px;
    width: 5px;
    height: 5px;
    content: "";
    background: #d9bd85;
    border-radius: 50%;
}

.sidebar-nav i {
    color: #87948f;
}

.sidebar-nav a:hover i,
.sidebar-nav a.active i {
    color: #d8b875;
}

.app-topbar {
    height: 68px;
    padding: 0 30px;
    background: rgba(255, 255, 255, .97);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.topbar-title {
    position: relative;
    padding-left: 13px;
    color: #27332f;
    font-size: 15px;
    font-weight: 700;
}

.topbar-title::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 3px;
    height: 18px;
    content: "";
    background: var(--accent);
    border-radius: 1px;
    transform: translateY(-50%);
}

.topbar-user {
    color: #56625e;
    font-size: 13px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    color: #e7ecea;
    background: #263733;
    border: 1px solid #344943;
}

.app-content {
    max-width: 1680px;
    padding: 30px 32px 44px;
}

.page-heading {
    align-items: center;
    margin-bottom: 22px;
}

.page-heading h1 {
    color: #15201d;
    font-size: 27px;
    font-weight: 720;
}

.page-heading p {
    max-width: 760px;
    margin-top: 7px;
    color: #74807c;
    line-height: 1.6;
}

.btn {
    border-radius: 5px;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
    box-shadow: 0 5px 12px rgba(13, 107, 87, .14);
}

.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: #79a99d;
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
}

.btn-outline-secondary {
    --bs-btn-color: #485651;
    --bs-btn-border-color: #b7c1bd;
    --bs-btn-hover-color: #1b2824;
    --bs-btn-hover-bg: #edf1ef;
    --bs-btn-hover-border-color: #9eaaa5;
}

.btn-icon {
    color: #596660;
    border: 1px solid transparent;
    border-radius: 4px;
}

.btn-icon:hover {
    color: var(--primary);
    background: #edf4f1;
    border-color: #d6e4df;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 44px;
    color: #25312d;
    background-color: #fcfdfc;
    border-color: var(--border-strong);
    border-radius: 5px;
}

.input-group-text {
    color: #697570;
    background: #f0f3f1;
}

.form-control::placeholder {
    color: #9ba5a1;
}

.form-control:focus,
.form-select:focus {
    color: #17221e;
    background: #fff;
    border-color: #559887;
    box-shadow: 0 0 0 3px rgba(13, 107, 87, .12);
}

.form-label {
    margin-bottom: 7px;
    color: #3f4d48;
    font-weight: 650;
}

.toolbar {
    margin-bottom: 16px;
    padding: 12px;
    background: #e9edeb;
    border: 1px solid #d5dcd9;
    border-radius: 6px;
}

.search-form {
    width: min(560px, 100%);
}

.table-shell,
.data-form {
    background: var(--surface);
    border-color: var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.table-shell {
    overflow: hidden;
}

.data-table {
    --bs-table-hover-bg: #f3f8f6;
}

.data-table th {
    height: 48px;
    padding: 12px 14px;
    color: #3f4c47;
    background: #eef1ef;
    border-bottom: 1px solid #cfd7d3;
    font-size: 12px;
    font-weight: 700;
}

.data-table td {
    height: 52px;
    padding: 11px 14px;
    color: #34403c;
    border-color: #e5e9e7;
}

.data-table tbody tr:hover > td {
    background: #f4f8f6;
}

.data-table tbody tr:hover > td:first-child {
    box-shadow: inset 3px 0 0 #6e9c90;
}

.data-table .actions {
    opacity: .72;
}

.data-table tr:hover .actions,
.data-table tr:focus-within .actions {
    opacity: 1;
}

.data-form {
    padding: 26px;
    border-top: 3px solid #31453f;
}

.form-grid {
    gap: 20px 18px;
}

.form-actions {
    margin-top: 28px;
    padding-top: 20px;
    border-top-color: #e2e7e5;
}

.form-section {
    padding: 25px 0;
}

.form-section-heading h2 {
    color: #26332e;
    font-weight: 700;
}

.form-section-heading p {
    line-height: 1.6;
}

.metric-grid,
.dashboard-metric-grid {
    gap: 10px;
}

.metric-item {
    position: relative;
    min-height: 102px;
    padding: 17px;
    border-color: var(--border);
    border-top: 3px solid #50645e;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.dashboard-metric:nth-child(1) { border-top-color: #247a65; }
.dashboard-metric:nth-child(2) { border-top-color: #557b9c; }
.dashboard-metric:nth-child(3) { border-top-color: #b48842; }
.dashboard-metric:nth-child(4) { border-top-color: #9b5268; }
.dashboard-metric:nth-child(5) { border-top-color: #347a7f; }
.dashboard-metric:nth-child(6) { border-top-color: #71618f; }

.metric-icon {
    width: 42px;
    height: 42px;
    border: 1px solid currentColor;
    border-radius: 6px;
    opacity: .92;
}

.tone-0 { color: #176b57; background: #edf6f2; }
.tone-1 { color: #426b92; background: #eef3f8; }
.tone-2 { color: #916419; background: #f8f3e9; }
.tone-3 { color: #8e4a61; background: #f7eff2; }
.tone-4 { color: #236d72; background: #edf6f6; }
.tone-5 { color: #665582; background: #f2eff6; }

.metric-item span {
    color: #66736e;
}

.metric-item strong {
    color: #1a2521;
    font-weight: 720;
}

.dashboard-metric small {
    color: #909b97;
}

.dashboard-chart-grid,
.dashboard-lower-grid {
    gap: 12px;
    margin-top: 12px;
}

.dashboard-panel {
    border-color: var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.dashboard-panel-header {
    min-height: 72px;
    padding: 16px 20px;
    background: #fafbfa;
    border-bottom-color: #dfe4e2;
}

.dashboard-panel-header h2 {
    color: #25322d;
    font-size: 16px;
    font-weight: 720;
}

.dashboard-panel-header p {
    color: #7c8783;
}

.dashboard-period {
    padding: 7px 10px;
    color: #5e6a65;
    background: #e8ecea;
    border: 1px solid #d6ddda;
    border-radius: 4px;
}

.legend-worker,
.trend-worker,
.work-type-track i {
    background: #267661;
}

.legend-signup,
.trend-signup {
    background: var(--accent);
}

.funnel-target { background: #4d6d88; }
.funnel-delivered { background: #267661; }
.funnel-opened { background: #b48842; }
.funnel-signed { background: #96516a; }

.funnel-track,
.work-type-track {
    background: #e9eeeb;
}

.dashboard-table th {
    color: #4d5a55;
    background: #eef1ef;
}

.dashboard-table td {
    border-color: #e4e8e6;
}

.panel-link {
    font-weight: 650;
}

.quick-link {
    border-radius: 5px;
    box-shadow: var(--shadow-sm);
}

.quick-link:hover {
    color: var(--primary);
    background: #fbfdfc;
    border-color: #79a99d;
    transform: translateY(-1px);
}

.wechat-summary {
    overflow: hidden;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.wechat-summary > a {
    min-height: 82px;
    padding: 17px 20px;
}

.wechat-summary > a:hover,
.wechat-summary > a:focus-visible {
    background: #f0f6f3;
    box-shadow: inset 0 -3px 0 var(--accent);
}

.wechat-summary strong {
    color: #1b2622;
    font-weight: 720;
}

.status-badge,
.status-pill {
    border-radius: 3px;
}

.status-success {
    color: #0b624e;
    background: #e1f0ea;
}

.status-muted {
    color: #5c6964;
    background: #e9edeb;
}

.modal-content {
    border: 1px solid #cad3cf;
    border-radius: 7px;
    box-shadow: 0 24px 70px rgba(16, 28, 24, .2);
}

.modal-header {
    padding: 18px 20px;
    background: #f6f8f7;
    border-bottom-color: var(--border);
}

.modal-footer {
    background: #fafbfa;
    border-top-color: var(--border);
}

.alert {
    border-radius: 5px;
    box-shadow: var(--shadow-md);
}

/* Login uses one strong brand plane and one focused task plane. */
.login-page {
    min-height: 100vh;
    background: #e9edeb;
}

.login-shell {
    min-height: 100vh;
    padding: 32px;
}

.login-frame {
    width: min(920px, 100%);
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(300px, .82fr) minmax(420px, 1.18fr);
    overflow: hidden;
    background: #fff;
    border: 1px solid #cfd7d3;
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(17, 29, 25, .16);
}

.login-identity {
    position: relative;
    display: flex;
    min-width: 0;
    justify-content: space-between;
    flex-direction: column;
    overflow: hidden;
    padding: 42px 38px 38px;
    color: #f4f7f5;
    background: #14201d;
    border-right: 1px solid #263631;
}

.login-identity::after {
    position: absolute;
    top: 112px;
    right: -74px;
    width: 230px;
    height: 230px;
    content: "";
    border: 1px solid rgba(209, 177, 112, .22);
    transform: rotate(12deg);
}

.login-identity-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    z-index: 1;
}

.login-identity-mark {
    width: 42px;
    height: 42px;
    display: grid;
    flex: 0 0 42px;
    place-items: center;
    color: #17211e;
    background: #d2ae68;
    border-radius: 5px;
    font-size: 19px;
}

.login-identity-brand strong,
.login-identity-brand small {
    display: block;
}

.login-identity-brand strong {
    font-size: 17px;
}

.login-identity-brand small {
    margin-top: 3px;
    color: #99a7a2;
    font-size: 11px;
}

.login-monogram {
    position: relative;
    z-index: 1;
    color: #263630;
    font-family: "Segoe UI Variable", "Segoe UI", sans-serif;
    font-size: 126px;
    font-weight: 800;
    line-height: .8;
}

.login-identity-meta {
    position: relative;
    z-index: 1;
}

.login-identity-meta span,
.login-identity-meta strong {
    display: block;
}

.login-identity-meta span {
    color: #b89a62;
    font-size: 10px;
    font-weight: 700;
}

.login-identity-meta strong {
    max-width: 250px;
    margin-top: 9px;
    color: #dce3df;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
}

.login-panel {
    width: auto;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 58px 64px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.login-panel > .login-brand {
    display: none;
}

.login-heading {
    margin-bottom: 32px;
}

.login-heading span {
    color: var(--accent);
    font-size: 10px;
    font-weight: 750;
}

.login-heading h2 {
    margin: 8px 0 0;
    color: #17211e;
    font-size: 28px;
    font-weight: 720;
}

.login-form .form-label {
    margin-bottom: 8px;
    color: #46534e;
}

.login-form .input-group {
    margin-bottom: 22px !important;
}

.login-form .input-group-text {
    width: 48px;
    justify-content: center;
    color: #5c6964;
    background: #eef2f0;
}

.login-form .form-control,
.login-form .input-group-text {
    min-height: 50px;
}

.login-form .btn {
    min-height: 50px;
    margin-top: 8px;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        width: min(88vw, 340px);
    }

    .app-sidebar .sidebar-brand {
        display: none;
    }

    .mobile-sidebar-header {
        height: 66px;
        padding: 0 14px 0 20px;
        background: #17221f;
    }

    .mobile-sidebar-backdrop {
        left: min(88vw, 340px);
    }

    .sidebar-nav {
        padding-top: 12px;
    }

    .app-content {
        padding: 26px 22px 38px;
    }
}

@media (max-width: 767.98px) {
    .login-shell {
        padding: 18px;
    }

    .login-frame {
        min-height: 0;
        display: block;
        max-width: 460px;
    }

    .login-identity {
        display: none;
    }

    .login-panel {
        padding: 34px 28px;
    }

    .login-panel > .login-brand {
        display: flex;
        margin-bottom: 30px;
    }

    .login-heading {
        margin-bottom: 26px;
    }

    .login-heading h2 {
        font-size: 25px;
    }
}

@media (max-width: 575.98px) {
    .app-topbar {
        height: 60px;
        padding: 0 10px;
    }

    .topbar-title {
        font-size: 14px;
    }

    .app-content {
        padding: 20px 12px 30px;
    }

    .page-heading {
        margin-bottom: 18px;
    }

    .page-heading h1 {
        font-size: 24px;
    }

    .toolbar {
        padding: 10px;
    }

    .metric-item {
        min-height: 96px;
    }

    .data-form {
        padding: 18px 15px;
    }

    .dashboard-panel-header {
        padding: 15px;
    }

    .login-shell {
        padding: 12px;
    }

    .login-panel {
        padding: 30px 22px;
    }
}

/* Tenant page-permission editor */
.permission-subject-panel,
.permission-editor {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.permission-subject-panel {
    display: grid;
    grid-template-columns: minmax(260px, .7fr) minmax(520px, 1.3fr);
    align-items: center;
    gap: 28px;
    padding: 22px 24px;
}

.permission-subject-panel > header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.permission-subject-panel > header > span {
    width: 44px;
    height: 44px;
    display: grid;
    flex: 0 0 44px;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border: 1px solid #b9d3ca;
    border-radius: 5px;
    font-size: 20px;
}

.permission-subject-panel h2,
.permission-editor-heading h2 {
    margin: 0;
    color: #23302b;
    font-size: 17px;
    font-weight: 720;
}

.permission-subject-panel p,
.permission-editor-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.permission-subject-form {
    display: grid;
    grid-template-columns: minmax(150px, .6fr) minmax(260px, 1.4fr) auto;
    align-items: end;
    gap: 12px;
}

.permission-empty-state {
    min-height: 300px;
    display: grid;
    place-content: center;
    margin-top: 16px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed #c8d1cd;
    border-radius: 6px;
}

.permission-empty-state i {
    color: #8b9994;
    font-size: 38px;
}

.permission-empty-state h2 {
    margin: 14px 0 0;
    color: #3b4843;
    font-size: 18px;
}

.permission-empty-state p {
    margin: 7px 0 0;
    font-size: 13px;
}

.permission-editor {
    margin-top: 16px;
    overflow: hidden;
}

.permission-editor-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    background: #fafbfa;
    border-bottom: 1px solid var(--border);
}

.permission-editor-heading > div:last-child {
    display: flex;
    gap: 8px;
}

.permission-group {
    padding: 22px 24px 24px;
    border-bottom: 1px solid #e2e7e4;
}

.permission-group > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 13px;
}

.permission-group h3 {
    margin: 0;
    color: #34413c;
    font-size: 14px;
    font-weight: 720;
}

.permission-group-toggle {
    padding: 4px 0;
    color: var(--primary);
    background: transparent;
    border: 0;
    font-size: 12px;
    font-weight: 650;
}

.permission-option-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.permission-option {
    display: grid;
    grid-template-columns: 20px 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 66px;
    padding: 10px 12px;
    cursor: pointer;
    background: #fbfcfb;
    border: 1px solid #dce2df;
    border-radius: 5px;
}

.permission-option:hover {
    background: #f4f8f6;
    border-color: #a9c4bb;
}

.permission-option:has(input:checked) {
    background: #eef6f2;
    border-color: #72a697;
    box-shadow: inset 3px 0 0 var(--primary);
}

.permission-option .form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.permission-option-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #53635d;
    background: #edf1ef;
    border-radius: 4px;
}

.permission-option:has(input:checked) .permission-option-icon {
    color: #fff;
    background: var(--primary);
}

.permission-option strong,
.permission-option small {
    display: block;
    min-width: 0;
}

.permission-option strong {
    overflow: hidden;
    color: #2c3934;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-option small {
    margin-top: 3px;
    overflow: hidden;
    color: #8a9591;
    font: 10px/1.3 Consolas, monospace;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permission-save-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 24px;
    background: rgba(250, 251, 250, .97);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 20px rgba(20, 34, 29, .05);
}

.permission-save-bar > span {
    color: #65716c;
    font-size: 12px;
}

.access-denied-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.access-denied-panel {
    width: min(460px, 100%);
    padding: 42px 34px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
}

.access-denied-panel > span {
    width: 58px;
    height: 58px;
    display: inline-grid;
    place-items: center;
    color: #7b6232;
    background: #f5efe2;
    border-radius: 6px;
    font-size: 27px;
}

.access-denied-panel h1 {
    margin: 20px 0 0;
    font-size: 22px;
}

.access-denied-panel p {
    margin: 10px 0 24px;
    color: var(--muted);
}

.access-denied-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.access-denied-actions form {
    margin: 0;
}

@media (max-width: 1199.98px) {
    .permission-subject-panel {
        grid-template-columns: 1fr;
    }

    .permission-option-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .permission-subject-form {
        grid-template-columns: 1fr;
    }

    .permission-subject-form .btn {
        width: 100%;
    }

    .permission-editor-heading,
    .permission-save-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .permission-editor-heading > div:last-child,
    .permission-save-bar .btn {
        width: 100%;
    }

    .permission-editor-heading > div:last-child .btn {
        flex: 1;
    }

    .permission-option-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .permission-subject-panel,
    .permission-group {
        padding: 18px 15px;
    }

    .permission-option-grid {
        grid-template-columns: 1fr;
    }
}

/* 身份证照片维护：高敏资料使用清晰、克制的独立区域，避免与普通文本字段混淆。 */
.identity-photo-admin-panel {
    margin-bottom: 18px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 3px solid #9a7937;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
}

.identity-photo-admin-heading,
.identity-photo-admin-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.identity-photo-admin-heading {
    margin-bottom: 18px;
}

.identity-photo-admin-heading h2 {
    margin: 0;
    font-size: 18px;
}

.identity-photo-admin-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.identity-photo-admin-heading > span {
    padding: 7px 10px;
    color: #6f572b;
    background: #f7f1e6;
    border: 1px solid #e7d7b8;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

.identity-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.identity-photo-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 14px;
    color: var(--text);
    background: #fbfcfb;
    border: 1px solid #d8dedb;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.identity-photo-card:hover,
.identity-photo-card:focus-within {
    border-color: #2d6a57;
    box-shadow: 0 0 0 3px rgba(45, 106, 87, .1);
}

.identity-photo-title {
    font-weight: 700;
}

.identity-photo-frame {
    position: relative;
    display: grid;
    width: 100%;
    overflow: hidden;
    place-items: center;
    aspect-ratio: 1.58 / 1;
    background: #eef1ef;
    border: 1px dashed #b8c2bd;
    border-radius: 4px;
}

.identity-photo-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #eef1ef;
}

.identity-photo-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    color: #69746f;
    text-align: center;
}

.identity-photo-empty i {
    font-size: 30px;
    color: #8d9a94;
}

.identity-photo-action {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #174f40;
    background: #e7f0ec;
    border-radius: 4px;
    font-weight: 700;
}

.identity-photo-card input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.identity-photo-admin-actions {
    margin-top: 16px;
}

.identity-photo-admin-actions small,
.identity-photo-help {
    color: var(--muted);
}

.identity-photo-create-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 15px 18px;
    color: #5f512f;
    background: #f8f3e9;
    border: 1px solid #eadcbc;
    border-radius: 6px;
}

.worker-profile-page {
    min-height: 100vh;
    background: #f2f5f3;
}

.worker-profile-shell {
    width: min(680px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 24px 18px 30px;
    background: #fff;
}

.worker-profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e3e8e5;
}

.worker-profile-header > span {
    width: 52px;
    height: 52px;
    display: grid;
    flex: 0 0 52px;
    place-items: center;
    color: #fff;
    background: #174f40;
    border-radius: 6px;
    font-size: 24px;
}

.worker-profile-header h1 {
    margin: 0;
    font-size: 24px;
}

.worker-profile-header p {
    margin: 5px 0 0;
    color: #69746f;
}

.worker-profile-note {
    display: flex;
    gap: 12px;
    margin: 18px 0;
    padding: 15px;
    color: #5d4d29;
    background: #f8f3e9;
    border: 1px solid #eadcbc;
    border-radius: 6px;
}

.worker-profile-note i {
    flex: 0 0 auto;
    font-size: 20px;
}

.worker-profile-note p {
    margin: 0;
    line-height: 1.65;
}

.worker-profile-shell .identity-photo-card {
    padding: 12px;
}

.worker-profile-shell .identity-photo-action {
    min-height: 48px;
    font-size: 16px;
}

.identity-photo-help {
    margin: 14px 0;
    font-size: 13px;
    text-align: center;
}

.worker-profile-back {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    color: #43534c;
    text-decoration: none;
}

.worker-profile-shell footer {
    margin-top: 30px;
    color: #8b9691;
    text-align: center;
    font-size: 12px;
}

.my-profile-entry {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    grid-template-areas:
        "icon title arrow"
        "icon text arrow";
    align-items: center;
    gap: 2px 12px;
    min-height: 72px;
    margin: 14px 0 18px;
    padding: 12px 14px;
    color: #173c31;
    background: #edf4f1;
    border: 1px solid #cfe0d9;
    border-radius: 6px;
    text-decoration: none;
}

.my-profile-entry > span {
    width: 46px;
    height: 46px;
    display: grid;
    grid-area: icon;
    place-items: center;
    color: #fff;
    background: #24604f;
    border-radius: 5px;
    font-size: 21px;
}

.my-profile-entry strong {
    grid-area: title;
}

.my-profile-entry small {
    grid-area: text;
    color: #66756f;
}

.my-profile-entry > i {
    grid-area: arrow;
}

@media (max-width: 767.98px) {
    .identity-photo-admin-heading,
    .identity-photo-admin-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .identity-photo-admin-actions .btn {
        min-height: 48px;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .identity-photo-grid {
        grid-template-columns: 1fr;
    }

    .worker-profile-shell {
        padding: 18px 14px 26px;
    }

    .worker-profile-shell .identity-photo-card {
        padding: 14px;
    }
}
