:root {
    --ink: #172027;
    --muted: #65727b;
    --line: #d9e0e3;
    --paper: #ffffff;
    --soft: #f3f6f5;
    --green: #159447;
    --green-dark: #0d6d34;
    --red: #cf3e32;
    --amber: #d79024;
    --blue: #246b8f;
    --header: #11191e;
    --radius: 6px;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
textarea { font: inherit; width: 100%; min-height: 150px; margin-top: 7px; padding: 11px 12px; border: 1px solid #b9c5ca; border-radius: 4px; resize: vertical; }

.site-header {
    min-height: 68px;
    padding: 0 4vw;
    background: rgba(17, 25, 30, .97);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 700; white-space: nowrap; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand small { margin-left: 4px; color: #9fb0b8; font-size: 11px; font-weight: 600; }
.site-header nav { display: flex; align-items: center; gap: 23px; font-size: 14px; }
.site-header nav > a:not(.button):hover { color: #62ce83; }

.button {
    min-height: 40px;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    background: var(--green);
    color: #fff;
}
.button:hover { background: var(--green-dark); }
.button.primary { background: var(--green); }
.button.secondary { border-color: #b7c2c7; background: transparent; color: inherit; }
.site-header .button.secondary { border-color: #58666e; }
.button.secondary:hover { border-color: var(--green); color: var(--green); background: transparent; }
.button.danger-text, .danger-text { color: var(--red); }
.button.ghost { border-color: rgba(255, 255, 255, .6); background: rgba(0, 0, 0, .18); }
.button.ghost:hover { border-color: #fff; background: rgba(0, 0, 0, .38); }
.button.full { width: 100%; }

.hero { min-height: min(760px, calc(100vh - 68px)); position: relative; display: flex; align-items: center; overflow: hidden; background: #121b20; }
.hero-image { position: absolute; inset: 0; background: url("/assets/product-workspace.png") center 38% / cover no-repeat; }
.hero-shade { position: absolute; inset: 0; background: rgba(8, 16, 20, .66); }
.hero-content { position: relative; z-index: 2; width: min(1180px, 92vw); margin: 0 auto; color: #fff; padding: 80px 0 110px; }
.eyebrow { margin: 0 0 14px; color: #75dd92; font-size: 12px; font-weight: 800; letter-spacing: 0; }
.eyebrow.dark { color: var(--green-dark); }
.hero h1 { margin: 0; max-width: 900px; font-size: clamp(44px, 7vw, 86px); line-height: 1.02; letter-spacing: 0; }
.hero-copy { max-width: 710px; margin: 24px 0 30px; font-size: clamp(18px, 2vw, 23px); line-height: 1.75; color: #e2e9ec; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-status { margin-top: 34px; color: #c8d2d7; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.hero-status span { width: 9px; height: 9px; border-radius: 50%; background: #54d77a; box-shadow: 0 0 0 5px rgba(84, 215, 122, .14); }

.image-marquee { overflow: hidden; border-top: 1px solid #dce4e7; border-bottom: 1px solid #dce4e7; background: #f7faf8; padding: 24px 0 26px; }
.marquee-heading { width: min(1180px, 92vw); margin: 0 auto 16px; display: flex; align-items: baseline; gap: 14px; }
.marquee-heading span { color: var(--green-dark); font-size: 12px; font-weight: 800; }
.marquee-heading strong { font-size: 20px; letter-spacing: 0; }
.gallery-shell { position: relative; width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding: 0 0 24px; }
.marquee-viewport { overflow: hidden; cursor: grab; scroll-behavior: smooth; padding: 2px 0 14px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%); }
.marquee-viewport.dragging { cursor: grabbing; scroll-behavior: auto; }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: jgcam-marquee 54s linear infinite; will-change: transform; }
.marquee-viewport:hover .marquee-track, .marquee-viewport.dragging .marquee-track, .marquee-viewport.manual-scroll .marquee-track { animation-play-state: paused; }
.marquee-image-button { flex: 0 0 auto; padding: 0; border: 0; background: transparent; cursor: zoom-in; scroll-snap-align: start; }
.marquee-track img { display: block; width: 430px; height: 244px; object-fit: cover; border: 1px solid #cbd6d2; border-radius: 6px; background: #fff; box-shadow: 0 10px 28px rgba(22, 32, 29, .12); }
.marquee-image-button:hover img { border-color: var(--green); box-shadow: 0 14px 34px rgba(21, 148, 71, .18); }
.gallery-nav { position: absolute; top: 94px; z-index: 2; width: 46px; height: 78px; border: 1px solid rgba(255,255,255,.42); background: rgba(17,25,30,.28); color: rgba(255,255,255,.9); font-size: 42px; line-height: 1; box-shadow: 0 10px 24px rgba(22, 32, 29, .12); backdrop-filter: blur(6px); opacity: .42; transition: opacity .18s ease, background .18s ease; }
.gallery-shell:hover .gallery-nav { opacity: .86; }
.gallery-nav:hover { border-color: rgba(255,255,255,.72); background: rgba(17,25,30,.58); color: #fff; }
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }
.gallery-hint { position: absolute; right: 5vw; bottom: 0; color: var(--muted); font-size: 12px; }
@keyframes jgcam-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.band { padding: 86px 5vw; }
.section-heading { max-width: 760px; margin-bottom: 42px; }
.section-heading h2, .account-band h2 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 48px); line-height: 1.15; letter-spacing: 0; }
.section-heading p, .account-band p { color: var(--muted); line-height: 1.8; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature-grid.cam-grid { grid-template-columns: repeat(4, 1fr); }
.feature { min-height: 225px; padding: 30px 28px; border-right: 1px solid var(--line); }
.feature:nth-child(4n) { border-right: 0; }
.feature:nth-child(n+5) { border-top: 1px solid var(--line); }
.feature svg { width: 27px; height: 27px; color: var(--green); }
.feature h3 { margin: 25px 0 10px; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.75; font-size: 14px; }

.dark-band { background: #182126; color: #fff; }
.section-heading.light p { color: #b9c5ca; }
.workflow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid #405058; }
.workflow li { min-height: 185px; padding: 28px 24px; border-right: 1px solid #405058; display: flex; gap: 18px; }
.workflow li:last-child { border-right: 0; }
.workflow span { color: #60d782; font-family: Consolas, monospace; font-weight: 700; }
.workflow h3 { margin: 0 0 10px; font-size: 18px; }
.workflow p { margin: 0; color: #afbdc3; line-height: 1.7; font-size: 14px; }
.detail-band { background: #fff; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.detail-grid div { padding: 30px; border-right: 1px solid var(--line); min-height: 190px; }
.detail-grid div:last-child { border-right: 0; }
.detail-grid h3 { margin: 0 0 12px; font-size: 21px; }
.detail-grid p { margin: 0; color: var(--muted); line-height: 1.85; }
.studio-band { background: #edf3ef; }
.note-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #cbd8d1; border-bottom: 1px solid #cbd8d1; }
.note-grid article { min-height: 170px; padding: 28px 26px; border-right: 1px solid #cbd8d1; background: rgba(255,255,255,.42); }
.note-grid article:last-child { border-right: 0; }
.note-grid h3 { margin: 0 0 12px; font-size: 20px; }
.note-grid p { margin: 0; color: var(--muted); line-height: 1.8; }
.download-strip { margin-top: 34px; padding: 20px 22px; border: 1px solid #cbd8d1; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.download-strip strong { display: block; margin-bottom: 5px; font-size: 18px; }
.download-strip span { color: var(--muted); font-size: 13px; }
.image-lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 44px; background: rgba(10, 16, 19, .86); }
.image-lightbox[hidden] { display: none; }
.image-lightbox img { max-width: min(1200px, 94vw); max-height: 88vh; object-fit: contain; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; background: #fff; }
.lightbox-close { position: fixed; right: 24px; top: 20px; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: rgba(0,0,0,.25); color: #fff; font-size: 28px; line-height: 1; }
.contact-band { background: #fff; }
.contact-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.contact-card { border: 1px solid var(--line); padding: 16px; min-height: 190px; background: #fff; text-align: center; }
.contact-qr-button { border: 0; background: transparent; padding: 0; cursor: zoom-in; }
.contact-card img { width: 138px; height: 138px; object-fit: contain; border: 1px solid #d8e0dc; background: #fff; padding: 6px; }
.contact-qr-button:hover img { border-color: var(--green); box-shadow: 0 12px 28px rgba(21, 148, 71, .16); }
.contact-card h3 { margin: 13px 0 6px; font-size: 16px; }
.contact-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; word-break: break-all; }

.site-footer { background: #0f161a; color: #dce4e7; padding: 42px 5vw; display: flex; justify-content: space-between; gap: 35px; }
.site-footer p { color: #899aa2; font-size: 13px; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; color: #899aa2; font-size: 12px; }

.auth-shell { min-height: calc(100vh - 68px); padding: 65px 20px; background: #eef2f1; display: flex; align-items: flex-start; justify-content: center; }
.auth-panel { width: min(520px, 100%); padding: 34px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 50px rgba(26, 38, 44, .09); }
.install-panel { width: min(680px, 100%); }
.auth-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 25px; }
.auth-heading img { width: 52px; height: 52px; object-fit: contain; }
.auth-heading h1 { margin: 0; font-size: 25px; letter-spacing: 0; }
.auth-heading .eyebrow { margin-bottom: 5px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.auth-tabs a { padding: 12px; text-align: center; color: var(--muted); border-bottom: 3px solid transparent; }
.auth-tabs a.active { color: var(--ink); border-color: var(--green); font-weight: 700; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-stack label, .settings-strip label { color: #39464d; font-size: 13px; font-weight: 700; }
input, select { width: 100%; min-height: 42px; margin-top: 7px; padding: 9px 11px; color: var(--ink); background: #fff; border: 1px solid #bdc8cd; border-radius: 4px; outline: none; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(21, 148, 71, .12); }
.check-row { display: flex; align-items: center; gap: 10px; font-weight: 400 !important; }
.check-row input { width: 18px; min-height: 18px; margin: 0; }
.check-row a { color: var(--green-dark); text-decoration: underline; }
.form-note { margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.form-links { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.form-links a { color: var(--green-dark); text-decoration: underline; }
.notice { margin: 0 0 18px; padding: 12px 14px; border-radius: 4px; border: 1px solid; font-size: 13px; line-height: 1.6; }
.notice.error { color: #8f281f; background: #fff0ee; border-color: #efb7b1; }
.notice.success { color: #0b6730; background: #eaf8ef; border-color: #a9dbba; }
.notice.warning { color: #775214; background: #fff8e9; border-color: #e9cd91; margin-top: 20px; }

.dashboard-shell, .admin-shell, .document-shell { width: min(1400px, 92vw); min-height: 70vh; margin: 0 auto; padding: 55px 0 80px; }
.document-shell { max-width: 900px; }
.document-shell h1 { font-size: 42px; margin: 0 0 40px; }
.document-shell section { padding: 24px 0; border-top: 1px solid var(--line); }
.document-shell h2 { font-size: 19px; }
.document-shell p { color: var(--muted); line-height: 1.85; }
.dashboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.dashboard-heading h1 { margin: 0 0 7px; font-size: 36px; letter-spacing: 0; }
.dashboard-heading p { margin: 0; color: var(--muted); }
.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.status-grid > div { min-height: 125px; padding: 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.status-grid > div:last-child { border-right: 0; }
.status-grid span { color: var(--muted); font-size: 13px; }
.status-grid strong { font-size: 18px; }
.status-good { color: var(--green-dark); }
.status-bad { color: var(--red); }
.table-section { margin-top: 34px; }
.section-row { display: flex; justify-content: space-between; margin-bottom: 16px; }
.section-row h2 { margin: 0 0 5px; font-size: 21px; }
.section-row p { margin: 0; color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
th { padding: 13px 14px; text-align: left; color: #536169; background: #f0f3f2; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid #e7ebed; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td small { display: block; margin-top: 4px; color: var(--muted); }
td code { font-family: Consolas, monospace; color: var(--blue); }
.empty { text-align: center; color: var(--muted); padding: 35px; }
.icon-button { width: 36px; height: 36px; padding: 0; border: 1px solid #b9c5ca; border-radius: 4px; background: #fff; color: var(--ink); display: inline-grid; place-items: center; }
.icon-button:hover { border-color: var(--green); color: var(--green); }
.icon-button.danger:hover { border-color: var(--red); color: var(--red); }
.icon-button svg { width: 17px; height: 17px; }
.row-actions { display: flex; gap: 7px; }
.feedback-form { display: grid; gap: 16px; max-width: 680px; }
.feedback-form label { font-weight: 700; color: #39464d; }

.settings-strip { margin-bottom: 30px; padding: 18px; background: #eef3f0; border: 1px solid #d4dfd8; }
.settings-strip form { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); align-items: end; gap: 12px; }
.settings-strip .button { min-width: 120px; }
.settings-strip input { background: #fff; }
.filter-bar { display: grid; grid-template-columns: 1.2fr .8fr .8fr auto; align-items: end; gap: 12px; margin: 18px 0; padding: 16px; border: 1px solid var(--line); background: #fff; }
.filter-bar label { color: #39464d; font-size: 13px; font-weight: 700; }
.stat-cards { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); background: #fff; margin-bottom: 24px; }
.stat-cards div { padding: 17px 18px; border-right: 1px solid var(--line); }
.stat-cards div:last-child { border-right: 0; }
.stat-cards span { display: block; color: var(--muted); font-size: 12px; }
.stat-cards strong { display: block; margin-top: 5px; font-size: 24px; }
.admin-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
.tool-card { border: 1px solid var(--line); background: #fff; padding: 20px; }
.tool-card h2 { margin: 0 0 8px; font-size: 20px; }
.tool-card p { margin: 0 0 15px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-items: end; }
.invite-section { margin: 30px 0; padding: 22px; border: 1px solid var(--line); background: #fff; }
.invite-generator { display: grid; grid-template-columns: minmax(150px, .55fr) minmax(150px, .55fr) auto; align-items: end; gap: 12px; max-width: 720px; }
.invite-generator label { color: #39464d; font-size: 13px; font-weight: 700; }
.invite-generator .button svg { width: 17px; height: 17px; }
.invite-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 20px; border: 1px solid var(--line); }
.invite-stats div { padding: 16px 18px; border-right: 1px solid var(--line); }
.invite-stats div:last-child { border-right: 0; }
.invite-stats span { display: block; color: var(--muted); font-size: 12px; }
.invite-stats strong { display: block; margin-top: 4px; font-size: 22px; }
.invite-list-head { margin: 22px 0 12px; align-items: center; }
.contact-setting-row input[type="file"] { padding: 8px; background: #fff; }
.details-summary { cursor: pointer; user-select: none; padding: 12px 14px; border: 1px solid var(--line); background: #f6faf8; font-weight: 800; color: var(--ink); }
.invite-pool-details { margin-top: 18px; }
.table-section details .table-wrap { margin-top: 12px; }
.backup-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.backup-restore-form { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.admin-table input, .admin-table select { min-width: 120px; margin-top: 0; }
.admin-table input[type="datetime-local"] { min-width: 178px; }
.admin-table .small-input { width: 62px; min-width: 62px; }
.admin-table .password-reset-input { min-width: 118px; width: 118px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 42px; height: 23px; border-radius: 12px; display: block; background: #aeb9be; position: relative; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .18s ease; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(19px); }

@media (max-width: 980px) {
    .site-header { padding: 12px 4vw; align-items: flex-start; }
    .site-header nav { gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
    .site-header nav > a:not(.button) { display: none; }
    .hero { min-height: 700px; }
    .feature-grid, .feature-grid.cam-grid, .workflow, .detail-grid { grid-template-columns: repeat(2, 1fr); }
    .feature:nth-child(2), .workflow li:nth-child(2) { border-right: 0; }
    .feature:nth-child(4n) { border-right: 1px solid var(--line); }
    .feature:nth-child(2n) { border-right: 0; }
    .feature { border-bottom: 1px solid var(--line); }
    .detail-grid div:nth-child(2) { border-right: 0; }
    .detail-grid div { border-bottom: 1px solid var(--line); }
    .contact-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-shell { width: 100vw; padding: 0 0 24px; }
    .marquee-track img { width: 360px; height: 204px; }
    .status-grid { grid-template-columns: repeat(2, 1fr); }
    .status-grid > div:nth-child(2) { border-right: 0; }
    .status-grid > div { border-bottom: 1px solid var(--line); }
    .settings-strip form { grid-template-columns: repeat(2, 1fr); }
    .invite-generator { grid-template-columns: repeat(2, 1fr); }
    .invite-generator .button { grid-column: 1 / -1; }
    .filter-bar, .stat-cards, .admin-tools { grid-template-columns: repeat(2, 1fr); }
    .stat-cards div:nth-child(2n) { border-right: 0; }
}

@media (max-width: 620px) {
    .site-header { min-height: 62px; align-items: center; }
    .brand span { font-size: 15px; }
    .site-header nav .button { min-height: 36px; padding: 7px 11px; font-size: 12px; }
    .site-header nav > a:not(.button) { display: none; }
    .hero { min-height: 680px; }
    .hero-content { padding: 65px 0 90px; }
    .hero h1 { font-size: 48px; }
    .hero-copy { font-size: 17px; }
    .hero-actions .button { width: 100%; }
    .marquee-heading { display: block; }
    .marquee-heading strong { display: block; margin-top: 6px; font-size: 17px; line-height: 1.45; }
    .gallery-shell { padding: 0 0 28px; width: 100vw; }
    .marquee-viewport { -webkit-mask-image: none; mask-image: none; }
    .marquee-track { gap: 10px; animation-duration: 42s; }
    .marquee-track img { width: 76vw; height: 43vw; min-height: 150px; }
    .gallery-nav { display: none; }
    .gallery-hint { left: 6vw; right: 6vw; text-align: center; }
    .band { padding: 65px 6vw; }
    .feature-grid, .feature-grid.cam-grid, .workflow, .status-grid, .detail-grid, .contact-grid { grid-template-columns: 1fr; }
    .contact-card { min-height: 0; padding: 20px; }
    .contact-card img { width: min(72vw, 260px); height: min(72vw, 260px); }
    .feature, .workflow li, .status-grid > div, .detail-grid div { border-right: 0; }
    .site-footer, .dashboard-heading, .download-strip { align-items: flex-start; flex-direction: column; }
    .note-grid { grid-template-columns: 1fr; }
    .note-grid article { border-right: 0; border-bottom: 1px solid #cbd8d1; }
    .note-grid article:last-child { border-bottom: 0; }
    .footer-meta { align-items: flex-start; }
    .auth-panel { padding: 25px 20px; }
    .form-grid, .settings-strip form { grid-template-columns: 1fr; }
    .invite-generator, .invite-stats { grid-template-columns: 1fr; }
    .filter-bar, .stat-cards, .admin-tools, .tool-grid { grid-template-columns: 1fr; }
    .stat-cards div { border-right: 0; border-bottom: 1px solid var(--line); }
    .stat-cards div:last-child { border-bottom: 0; }
    .invite-stats div { border-right: 0; border-bottom: 1px solid var(--line); }
    .invite-stats div:last-child { border-bottom: 0; }
    .dashboard-shell, .admin-shell, .document-shell { width: 92vw; padding-top: 38px; }
    .document-shell h1 { font-size: 32px; }
    .image-lightbox { padding: 18px; }
    .image-lightbox img { max-width: 96vw; max-height: 84vh; }
}
