* {
    box-sizing: border-box;
}

:root {
    --ink: #172033;
    --muted: #64748b;
    --line: #dbe4ef;
    --line-soft: #edf2f7;
    --paper: #ffffff;
    --paper-soft: #f8fafc;
    --blue: #2563eb;
    --teal: #0f766e;
    --green: #16a34a;
    --amber: #f59e0b;
    --shadow: 0 18px 45px rgba(25, 38, 60, .09);
    --shadow-strong: 0 28px 90px rgba(25, 38, 60, .18);
}

body {
    margin: 0;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background:
        linear-gradient(120deg, rgba(37, 99, 235, .05), transparent 34%),
        linear-gradient(155deg, #f9fbff 0%, #eef7f4 48%, #fff8ed 100%);
}

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

input,
select,
textarea,
button {
    width: auto;
    font: inherit;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #8ab4ff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
    outline: 0;
}

button,
.button {
    display: inline-block;
    border: 0;
    background: var(--blue);
    color: #fff;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    text-align: center;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.danger {
    background: #dc2626;
}

button:hover,
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, .2);
}

.secondary {
    background: var(--teal);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: top;
}

th {
    background: #f3f7fb;
    color: #334155;
    font-weight: 700;
}

.app {
    display: flex;
    min-height: 100vh;
    background:
        linear-gradient(130deg, rgba(15, 118, 110, .08), transparent 38%),
        linear-gradient(160deg, #f8fbff 0%, #f1f8f6 58%, #fffaf0 100%);
}

.side-backdrop {
    display: none;
}

.mobile-side-toggle {
    display: none;
}

.side {
    width: 218px;
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 24px 16px;
    color: #ecfeff;
    background: linear-gradient(180deg, #183248 0%, #102033 52%, #0f2f2d 100%);
    box-shadow: 12px 0 32px rgba(15, 23, 42, .12);
}

.side h1 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    font-size: 22px;
}

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

.side-head h1 {
    margin-bottom: 0;
}

.side-toggle {
    width: 34px;
    height: 34px;
    padding: 0;
    color: #ecfeff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: none;
}

.app.side-collapsed .side {
    width: 76px;
    padding: 20px 10px;
}

.app.side-collapsed .side h1,
.app.side-collapsed .side > div:not(.side-head) {
    display: none !important;
}

.app.side-collapsed .side a {
    justify-content: center;
    padding: 10px;
}

.app.side-collapsed .side a .nav-icon,
.app.side-collapsed .side a .nav-ico {
    margin-right: 0;
}

.app.side-collapsed .side a {
    font-size: 0;
}

.admin-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
}

.side a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    padding: 11px 12px;
    border-radius: 8px;
    color: #dbeafe;
}

.side a:hover {
    background: rgba(255, 255, 255, .12);
}

.side-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
    padding: 11px 12px;
    color: #dbeafe;
    background: transparent;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
    text-align: left;
}

.side-group-toggle:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, .12);
}

.side-group-toggle > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.side-group-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    margin-bottom: 4px;
}

.side-group-link {
    margin-bottom: 0 !important;
}

.side-group-caret-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    color: #dbeafe;
    background: transparent;
    border: 0;
    border-radius: 8px;
    box-shadow: none;
}

.side-group-caret-btn:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, .12);
}

.side-group-caret {
    color: #ccfbf1;
    font-size: 13px;
}

.side-subnav {
    display: none;
    gap: 6px;
    margin: -6px 0 6px 22px;
    font-size: 13px;
}

.side-subnav.is-open {
    display: grid;
}

.iconfont {
    font-size: 18px;
    line-height: 1;
}

.iconfont:before {
    display: inline-block;
}

.icon-fallback {
    display: none;
}

.no-iconfont .iconfont {
    display: none;
}

.no-iconfont .icon-fallback {
    display: inline;
}

.icon-missing .iconfont {
    display: none;
}

.icon-missing .icon-fallback {
    display: inline;
}

.nav-ico {
    display: inline-grid;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    place-items: center;
    color: #ccfbf1;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
}

.nav-icon {
    display: inline-grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    color: #ecfeff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.nav-ico .iconfont,
.nav-icon .iconfont {
    font-size: 17px;
}

.nav-ico .icon-fallback,
.nav-icon .icon-fallback {
    display: none;
}

.no-iconfont .nav-ico .icon-fallback,
.no-iconfont .nav-icon .icon-fallback {
    display: inline;
}

.user-side {
    background: linear-gradient(180deg, #123c46 0%, #0f3a31 52%, #23351c 100%);
}

.main {
    flex: 1;
    overflow: auto;
    padding: 28px;
}

.main h2 {
    margin-top: 0;
}

.flash {
    margin-bottom: 16px;
    padding: 11px 13px;
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
}

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

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

.stat-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

.stat-card strong {
    font-size: 26px;
    line-height: 1.2;
    word-break: break-all;
}

.stat,
.panel {
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.stat {
    padding: 20px;
}

.icon-stat {
    position: relative;
    overflow: hidden;
    min-height: 124px;
}

.stat-icon {
    display: inline-grid;
    width: 38px;
    height: 38px;
    margin-bottom: 12px;
    place-items: center;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 10px;
    font-style: normal;
    font-weight: 900;
}

.stat-icon .iconfont {
    font-size: 20px;
}

.stat-icon .icon-fallback {
    display: none;
}

.no-iconfont .stat-icon .icon-fallback {
    display: inline;
}

.icon-stat:after {
    content: "";
    position: absolute;
    right: -22px;
    top: -22px;
    width: 86px;
    height: 86px;
    background: rgba(37, 99, 235, .08);
    border-radius: 999px;
}

.stat b {
    display: block;
    font-size: 34px;
}

.stat span,
.muted {
    color: var(--muted);
}

.stat .stat-icon {
    color: #0f766e;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.quick-actions a {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 4px 12px;
    align-items: center;
    padding: 16px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform .18s ease, border-color .18s ease;
}

.quick-actions a:hover {
    transform: translateY(-3px);
    border-color: #99f6e4;
}

.quick-actions span {
    grid-row: span 2;
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    border-radius: 10px;
    font-weight: 900;
}

.quick-actions .iconfont {
    font-size: 21px;
}

.quick-actions .icon-fallback {
    display: none;
}

.no-iconfont .quick-actions .icon-fallback {
    display: inline;
}

.quick-actions b {
    color: var(--ink);
}

.quick-actions small {
    color: var(--muted);
}

.panel {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    padding: 18px;
}

.row {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    align-items: start;
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

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

.actions input {
    width: 90px;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
}

.tag.status-approved {
    color: #047857;
    background: #d1fae5;
    border-color: #a7f3d0;
}

.tag.status-pending {
    color: #92400e;
    background: #fef3c7;
    border-color: #fde68a;
}

.tag.status-blocked {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fecaca;
}

.tag.green {
    color: #047857;
    background: #d1fae5;
    border-color: #a7f3d0;
}

button:disabled,
.button.disabled {
    cursor: not-allowed;
    opacity: .58;
    transform: none;
    box-shadow: none;
}

.detection-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 150px;
}

.detection-cell.inline {
    display: inline-flex;
    vertical-align: middle;
}

.detection-tag {
    border: 1px solid transparent;
    white-space: nowrap;
}

.detection-tag.detect-official {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #bfdbfe;
}

.detection-tag.detect-custom {
    color: #047857;
    background: #d1fae5;
    border-color: #a7f3d0;
}

.detection-tag.detect-wecom {
    color: #0f766e;
    background: #ccfbf1;
    border-color: #99f6e4;
}

.detection-tag.detect-friend {
    color: #7c2d12;
    background: #ffedd5;
    border-color: #fed7aa;
}

.detection-tag.detect-group {
    color: #6d28d9;
    background: #ede9fe;
    border-color: #ddd6fe;
}

.search-bar {
    grid-template-columns: repeat(auto-fit, minmax(150px, auto));
    align-items: center;
}

.search-bar input {
    min-width: min(320px, 100%);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.pagination a {
    min-width: 36px;
    padding: 8px 11px;
    text-align: center;
    color: #334155;
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
}

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

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

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.user-cell.compact {
    min-width: 150px;
}

.user-cell small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.5;
}

.avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    object-fit: cover;
    border: 1px solid var(--line-soft);
    border-radius: 50%;
    background: #eef6ff;
}

.avatar-empty {
    display: grid;
    place-items: center;
    color: #0f766e;
    font-weight: 800;
}

.mini-qr {
    display: block;
    width: 58px;
    height: 58px;
    margin-top: 8px;
    object-fit: cover;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
}

.editor-form {
    max-width: 920px;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.editor-toolbar button {
    color: #334155;
    background: #eef6ff;
    border: 1px solid #dbeafe;
    box-shadow: none;
}

.rich-editor {
    min-height: 190px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    line-height: 1.8;
    outline: 0;
}

.rich-editor:focus {
    border-color: #8ab4ff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.login-page,
.claim-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-text-size-adjust: 100%;
    touch-action: pan-y;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .08), transparent 36%),
        linear-gradient(155deg, #fbfdff 0%, #edf8f4 50%, #fff7e8 100%);
}

.login-box,
.claim-box {
    width: min(440px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    overscroll-behavior: contain;
    display: grid;
    gap: 14px;
    padding: 28px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(219, 228, 239, .9);
    border-radius: 12px;
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(12px);
}

.login-box h1,
.claim-box h1 {
    margin: 0;
    font-size: 26px;
}

.qr {
    height: 180px;
    display: grid;
    place-items: center;
    color: #64748b;
    background:
        linear-gradient(135deg, #f8fafc, #eff6ff);
    border: 1px dashed #b8c6d8;
    border-radius: 10px;
}

.qr-img,
.claim-qr {
    width: 180px;
    max-width: 100%;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
}

.wechat-qr {
    height: auto;
    padding: 18px;
}

.wechat-qr img {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.code {
    padding: 16px;
    color: #eafff9;
    background: #102033;
    border-radius: 10px;
    font-size: 20px;
    word-break: break-all;
}

.claim-notice {
    max-height: min(52vh, 520px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-right: 6px;
    color: #42526a;
    line-height: 1.8;
    word-break: break-word;
}

.claim-notice p {
    margin: 0 0 10px;
}

.claim-card {
    width: min(560px, 100%);
}

.claim-head h1 {
    margin-top: 8px;
}

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

.claim-product-template {
    display: grid;
    gap: 10px;
    margin-top: -2px;
    padding: 12px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    line-height: 1.75;
    word-break: break-word;
}

.claim-template-image-btn {
    width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    cursor: zoom-in;
}

.claim-template-image-btn img,
.claim-template-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid var(--line-soft);
}

.claim-template-content {
    overflow: auto;
    max-height: min(38vh, 360px);
    -webkit-overflow-scrolling: touch;
}

.claim-template-content p {
    margin: 0 0 8px;
}

.claim-template-content img {
    cursor: zoom-in;
}

.claim-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
}

.claim-customer .avatar {
    width: 44px;
    height: 44px;
}

.disabled-btn {
    background: #94a3b8;
}

.claim-qty-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.claim-history-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
}

.claim-history-time {
    position: static;
    justify-self: start;
    color: var(--muted);
    background: rgba(255,255,255,.9);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 4px 8px;
}

.claim-qr-btn {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    justify-self: stretch;
}

.claim-qr-mini {
    width: min(64vw, 220px) !important;
    height: auto !important;
    max-width: 220px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--line-soft);
}

.claim-code-item-line {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
}

.claim-code-idx {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    background: #eef2ff;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    color: #1d4ed8;
    font-weight: 900;
}

.qr-preview-box {
    width: min(420px, 100%);
    place-items: center;
    text-align: center;
}

.qr-preview-box .claim-qr {
    display: block;
    width: min(76vw, 360px);
    height: auto;
    max-height: 72vh;
    object-fit: contain;
    margin: 8px auto 0;
}

.claim-modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 20px;
    overflow: auto;
    background: rgba(15, 23, 42, .48);
    z-index: 20;
}

.show-claim-modal .claim-modal {
    display: grid;
}

.claim-modal-box {
    width: min(420px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    display: grid;
    gap: 12px;
    padding: 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-strong);
}

.modal-close {
    justify-self: end;
    color: #334155;
    background: #eef2f7;
    box-shadow: none;
}

.claim-history {
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}

.claim-history h3 {
    margin: 0 0 10px;
}

.claim-history div,
.claim-code-item {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
}

button.claim-code-item {
    width: 100%;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.claim-code-list {
    display: grid;
    gap: 14px;
}

.claim-code-item img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    justify-self: center;
}

@media (max-width: 420px) {
    .qr-img,
    .claim-qr {
        width: 150px;
    }

    .claim-code-item img {
        width: 100%;
        max-width: 100%;
        height: auto;
    }

    .claim-qr-mini {
        width: min(70vw, 200px) !important;
        height: auto !important;
    }
}

@media (max-width: 760px) {
    .link-form-grid {
        grid-template-columns: 1fr;
    }

    .link-form-item-wide {
        grid-column: auto;
    }
}

.code-list {
    margin: 8px 0 0;
    white-space: pre-wrap;
    color: #eafff9;
    background: #102033;
    border-radius: 10px;
    padding: 12px;
}

.mini-edit {
    display: grid;
    grid-template-columns: repeat(2, minmax(92px, 1fr));
    gap: 8px;
    min-width: 280px;
}

.mini-edit button {
    grid-column: 1 / -1;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-head h2 {
    margin-bottom: 6px;
}

/* Simple 2-column form layout (used by /admin/notice etc.) */
.form-grid {
    padding: 18px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px 14px;
    align-items: center;
}
.form-grid > label {
    font-weight: 700;
}
.form-grid > input,
.form-grid > textarea,
.form-grid > select {
    width: 100%;
}
@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .form-grid > div {
        grid-column: auto !important;
    }
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.link-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.link-table {
    min-width: 980px;
    box-shadow: none;
}

.link-table th,
.link-table td {
    vertical-align: middle;
}

.link-product-name {
    margin-bottom: 8px;
    font-weight: 800;
}

.link-url-cell code {
    display: block;
    max-width: 390px;
    padding: 10px 12px;
    color: #dffcf7;
    background: #102033;
    border-radius: 8px;
    line-height: 1.55;
    word-break: break-all;
}

.link-limit-line {
    color: var(--muted);
    line-height: 1.8;
    white-space: nowrap;
}

.link-limit-line b {
    color: var(--ink);
}

.link-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.link-status.is-on {
    color: #047857;
    background: #d1fae5;
}

.link-status.is-off {
    color: #991b1b;
    background: #fee2e2;
}

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

.row-actions form {
    margin: 0;
}

.row-actions button {
    padding: 8px 11px;
}

.product-list-table {
    min-width: 920px;
}

.product-line {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 180px;
}

.product-line small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

.price-text {
    color: #dc2626;
    font-size: 18px;
}

.remark-form {
    display: grid;
    gap: 8px;
    min-width: 210px;
}

.remark-form textarea {
    width: 100%;
    min-height: 72px;
    resize: vertical;
}

.remark-form button {
    justify-self: start;
    padding: 8px 11px;
}

.remark-cell {
    display: grid;
    gap: 8px;
    min-width: 180px;
}

.inline-code {
    display: inline-block;
    max-width: 260px;
    padding: 8px 10px;
    color: #dffcf7;
    background: #102033;
    border-radius: 8px;
    word-break: break-all;
}

.import-progress {
    display: grid;
    gap: 10px;
}

.import-bar {
    height: 10px;
    background: #eef2ff;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    overflow: hidden;
}

.import-bar i {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #0f766e);
    transition: width .2s ease;
}
.empty-cell {
    padding: 34px 16px;
    color: var(--muted);
    text-align: center;
}

.link-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

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

.link-card h3 {
    margin: 10px 0 0;
}

.link-card code {
    display: block;
    padding: 12px;
    color: #dffcf7;
    background: #102033;
    border-radius: 10px;
    word-break: break-all;
}

.link-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
}

.link-stats span {
    padding: 10px;
    color: var(--muted);
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
}

.link-stats b {
    display: block;
    margin-top: 4px;
    color: var(--ink);
}

.link-modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: none;
    place-items: center;
    padding: 20px;
    overflow: auto;
    background: rgba(15, 23, 42, .5);
}

.link-modal.active {
    display: grid;
}

.link-modal-box {
    width: min(520px, 100%);
    max-height: 92vh;
    overflow: auto;
    display: grid;
    gap: 10px;
    padding: 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow-strong);
}

.link-modal-box h3 {
    margin: 0 0 8px;
}

.link-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.link-form-item {
    display: grid;
    gap: 6px;
    align-content: start;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
}

.link-form-item label {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
}

.link-form-item small {
    color: var(--muted);
    line-height: 1.6;
}

.link-form-item input,
.link-form-item select {
    width: 100%;
    min-height: 44px;
    margin: 0;
    background: #fff;
}

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

.link-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.product-modal-box {
    width: min(980px, 100%);
}

.product-modal-box .tox-tinymce {
    border-radius: 10px;
}

.claim-notice img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.site-page {
    overflow-x: hidden;
    color: var(--ink);
    background: #f8fbff;
}

.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px clamp(18px, 5vw, 72px);
    background: rgba(255, 255, 255, .9);
    border-bottom: 1px solid rgba(226, 232, 240, .8);
    backdrop-filter: blur(14px);
    transition: box-shadow .25s ease, background .25s ease;
}

.site-nav:hover {
    box-shadow: 0 12px 34px rgba(15, 23, 42, .08);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #102033;
    font-weight: 800;
}

.site-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
}

.site-nav nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #475569;
}

.nav-button {
    padding: 9px 13px;
    color: #fff;
    background: #172033;
    border-radius: 8px;
}

.site-hero {
    position: relative;
    min-height: 92vh;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, .76fr);
    align-items: center;
    gap: 44px;
    overflow: hidden;
    padding: 108px clamp(18px, 5vw, 72px) 70px;
    color: #172033;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, .92) 0%, rgba(246, 251, 255, .86) 45%, rgba(236, 253, 245, .76) 100%),
        linear-gradient(150deg, #eaf2ff 0%, #eef9f4 54%, #fff3d7 100%);
}

.site-hero:before {
    content: "";
    position: absolute;
    inset: 78px clamp(18px, 5vw, 72px) auto auto;
    width: min(420px, 38vw);
    height: 72%;
    background:
        linear-gradient(180deg, rgba(15, 118, 110, .08), transparent),
        repeating-linear-gradient(0deg, rgba(15, 32, 51, .08) 0 1px, transparent 1px 42px),
        repeating-linear-gradient(90deg, rgba(15, 32, 51, .08) 0 1px, transparent 1px 42px);
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 18px;
    transform: skewY(-5deg);
    animation: heroPanel 8s ease-in-out infinite alternate;
    pointer-events: none;
}

.site-hero>* {
    position: relative;
}

.hero-inner {
    max-width: 740px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--teal);
    font-weight: 800;
    letter-spacing: 0;
}

.site-hero h1 {
    margin: 0;
    color: #102033;
    font-size: clamp(44px, 8vw, 82px);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero-copy {
    max-width: 650px;
    margin: 22px 0 0;
    color: #42526a;
    font-size: 19px;
    line-height: 1.8;
}

.hero-actions,
.hero-meta,
.deploy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions {
    margin-top: 30px;
}

.hero-meta {
    margin-top: 24px;
}

.hero-meta span {
    padding: 8px 10px;
    color: #28506a;
    background: rgba(255, 255, 255, .7);
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 8px;
}

.hero-preview {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    --move-x: 0px;
    --move-y: 0px;
    padding: 18px;
    color: #172033;
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 14px;
    box-shadow: var(--shadow-strong);
    transform: translate3d(var(--move-x), var(--move-y), 0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    transform-style: preserve-3d;
    animation: floatPanel 5.5s ease-in-out infinite;
    transition: transform .18s ease;
    backdrop-filter: blur(14px);
}

.preview-top {
    display: flex;
    gap: 7px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-soft);
}

.preview-top span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
}

.preview-top span:nth-child(1) {
    background: #ef4444;
}

.preview-top span:nth-child(2) {
    background: var(--amber);
}

.preview-top span:nth-child(3) {
    background: var(--green);
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.preview-grid div {
    position: relative;
    overflow: hidden;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.preview-grid div:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent, rgba(20, 184, 166, .16), transparent);
    transform: translateX(-120%);
    animation: shine 4s ease-in-out infinite;
}

.preview-grid div:nth-child(2):after {
    animation-delay: .5s;
}

.preview-grid div:nth-child(3):after {
    animation-delay: 1s;
}

.preview-grid div:nth-child(4):after {
    animation-delay: 1.5s;
}

.preview-grid b {
    display: block;
    margin-bottom: 8px;
}

.preview-grid small {
    color: var(--muted);
}

.preview-link {
    position: relative;
    overflow: hidden;
    margin-top: 14px;
    padding: 14px;
    color: #dffcf7;
    background: #102033;
    border-radius: 10px;
    word-break: break-all;
}

.preview-link:after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -90px;
    width: 80px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .24), transparent);
    animation: linkSweep 3.8s ease-in-out infinite;
}

.site-section {
    padding: 72px clamp(18px, 5vw, 72px);
}

.section-head {
    max-width: 720px;
    margin-bottom: 26px;
}

.site-section h2 {
    margin: 0;
    color: #102033;
    font-size: 34px;
    line-height: 1.25;
}

.site-section p {
    color: var(--muted);
    line-height: 1.8;
}

.flow,
.feature-list {
    display: grid;
    gap: 18px;
}

.flow {
    grid-template-columns: repeat(3, 1fr);
}

.flow article,
.feature-list div {
    padding: 24px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.preview-grid div:hover,
.flow article:hover,
.feature-list div:hover {
    transform: translateY(-4px);
    border-color: #99f6e4;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .1);
}

.flow span {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--teal);
    font-weight: 900;
}

.flow h3,
.feature-list b {
    display: block;
    margin: 0 0 10px;
    color: #172033;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(320px, 1fr);
    gap: 44px;
    align-items: start;
    background:
        linear-gradient(120deg, #ffffff 0%, #f7fbff 100%);
}

.feature-list {
    grid-template-columns: 1fr 1fr;
}

.feature-list div {
    background: #f8fafc;
}

.feature-list span {
    color: var(--muted);
    line-height: 1.7;
}

.deploy {
    color: #fff;
    background: linear-gradient(135deg, #102033 0%, #123c46 64%, #39410f 100%);
}

.deploy h2 {
    color: #fff;
}

.deploy p {
    max-width: 760px;
    color: #d7e2ee;
}

.deploy-actions {
    align-items: center;
    margin-top: 22px;
}

.deploy-actions span {
    color: #d7e2ee;
}

.home-wechat-qr {
    display: inline-grid;
    gap: 8px;
    margin-top: 18px;
    padding: 14px;
    color: #d7e2ee;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 12px;
}

.home-wechat-qr img {
    width: 128px;
    height: 128px;
    object-fit: cover;
    border-radius: 10px;
    background: #fff;
}

.site-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    padding: 42px clamp(18px, 5vw, 72px);
    color: #42526a;
    background: #ffffff;
    border-top: 1px solid var(--line-soft);
}

.site-footer p {
    max-width: 620px;
    margin: 12px 0 0;
    line-height: 1.8;
}

.footer-brand {
    color: #102033;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 12px 18px;
}

.footer-copy {
    grid-column: 1 / -1;
    padding-top: 18px;
    color: var(--muted);
    border-top: 1px solid var(--line-soft);
}

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

.settings-grid .panel {
    margin-bottom: 0;
}

.settings-grid h3 {
    margin: 0 0 4px;
}

.settings-actions {
    grid-column: 1 / -1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.chart-row {
    display: grid;
    grid-template-columns: 82px minmax(120px, 1fr) 48px;
    gap: 10px;
    align-items: center;
    margin: 12px 0;
}

.chart-row span,
.chart-row b {
    color: #475569;
    font-size: 14px;
}

.chart-row b {
    text-align: right;
}

.chart-row div {
    height: 12px;
    overflow: hidden;
    background: #eaf1f8;
    border-radius: 999px;
}

.chart-row i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--teal), #38bdf8);
    border-radius: inherit;
}

.chart-row.amber i {
    background: linear-gradient(90deg, var(--amber), #f97316);
}

.pie-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
}

.pie-chart {
    width: 138px;
    height: 138px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 18px rgba(255,255,255,.72), var(--shadow);
}

.pie-wrap small {
    display: block;
    margin: 8px 0;
    color: var(--muted);
}

.setting-preview {
    width: 150px;
    max-height: 70px;
    object-fit: contain;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
}

.icon-preview {
    width: 54px;
    height: 54px;
}

.user-hero-panel {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.overview-shell {
    display: grid;
    gap: 18px;
}

.overview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.overview-head h2 {
    margin: 0 0 8px;
    font-size: 42px;
    line-height: 1.05;
}

.overview-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.overview-chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 14px;
    color: #334155;
    background: rgba(255,255,255,.86);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    box-shadow: var(--shadow);
    font-weight: 700;
}

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

.overview-kpi {
    display: grid;
    gap: 8px;
    padding: 20px 18px;
    background: rgba(255,255,255,.94);
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

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

.overview-kpi strong {
    color: #5b6ee1;
    font-size: 40px;
    line-height: 1;
    letter-spacing: 0;
}

.overview-kpi small {
    color: #94a3b8;
    font-size: 12px;
}

.overview-kpi .is-up {
    color: #dc2626;
}

.overview-kpi .is-down {
    color: #16a34a;
}

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

.overview-panel {
    padding: 18px 18px 16px;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.overview-panel-wide {
    grid-column: 1 / -1;
}

.overview-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.overview-panel-head h3 {
    margin: 0;
}

.overview-ring-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.overview-ring {
    width: 164px;
    height: 164px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 22px rgba(255,255,255,.92), var(--shadow);
}

.overview-ring span {
    color: #102033;
    font-size: 30px;
    font-weight: 800;
}

.overview-legend {
    display: grid;
    gap: 12px;
    min-width: 220px;
}

.overview-legend-row {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.overview-legend-row i {
    display: block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.overview-legend-row .tone-teal {
    background: #2aa198;
}

.overview-legend-row .tone-amber {
    background: #f59e0b;
}

.overview-legend-row .tone-red {
    background: #ef4444;
}

.overview-legend-row .tone-indigo {
    background: #5b6ee1;
}

.overview-legend-row span {
    color: #475569;
}

.overview-legend-row b {
    color: #102033;
}

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

.overview-shortcuts a {
    display: grid;
    gap: 6px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
}

.overview-shortcuts a span {
    color: #102033;
    font-weight: 800;
}

.overview-shortcuts a small {
    color: var(--muted);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.product-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.product-cover {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line-soft);
}

.product-cover-empty {
    display: grid;
    place-items: center;
    color: var(--muted);
    background: #f8fafc;
}

.admin-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.admin-product-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.admin-product-card h3 {
    margin: 0 0 8px;
}

.admin-product-card strong {
    color: #dc2626;
    font-size: 24px;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.product-thumb {
    display: inline-grid;
    width: 70px;
    height: 70px;
    place-items: center;
    object-fit: cover;
    color: var(--muted);
    background: #f8fafc;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
}

.product-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

.product-mini img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line-soft);
}

.product-edit-row {
    flex-wrap: wrap;
}

.product-edit-row input[type=file] {
    max-width: 190px;
}

.product-card h3 {
    margin: 0 0 8px;
}

.product-card strong {
    color: #dc2626;
    font-size: 28px;
}

.product-card form {
    display: grid;
    gap: 10px;
}

.pay-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pay-options input {
    display: none;
}

.pay-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: #334155;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.pay-options input:checked + .pay-badge {
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
}

.pay-badge i {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: #fff;
    background: var(--blue);
    border-radius: 50%;
    font-style: normal;
    font-weight: 800;
    font-size: 12px;
}

.pay-badge i .iconfont {
    font-size: 14px;
}

.pay-badge.wxpay i {
    background: #16a34a;
}

.pay-badge.douyinpay i {
    background: #111827;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-row input {
    width: auto;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .72s ease, transform .72s cubic-bezier(.2, .8, .2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: .12s;
}

.delay-2 {
    transition-delay: .24s;
}

.delay-3 {
    transition-delay: .36s;
}

.delay-4 {
    transition-delay: .48s;
}

@keyframes floatPanel {
    0%,
    100% {
        transform: translate3d(var(--move-x), var(--move-y), 0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(0);
    }
    50% {
        transform: translate3d(var(--move-x), var(--move-y), 0) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-12px);
    }
}

@keyframes shine {
    0%,
    45% {
        transform: translateX(-120%);
    }
    70%,
    100% {
        transform: translateX(120%);
    }
}

@keyframes linkSweep {
    0%,
    45% {
        left: -90px;
    }
    80%,
    100% {
        left: 100%;
    }
}

@keyframes heroPanel {
    from {
        transform: skewY(-5deg) translate3d(-8px, 0, 0);
    }
    to {
        transform: skewY(-5deg) translate3d(16px, -16px, 0);
    }
}

@media (max-width: 900px) {
    .overview-head,
    .overview-panel-head {
        display: grid;
        grid-template-columns: 1fr;
    }

    .overview-kpis,
    .overview-grid,
    .overview-shortcuts {
        grid-template-columns: 1fr;
    }

    .site-nav {
        position: static;
        display: grid;
        gap: 12px;
    }

    .site-nav nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .site-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        padding-top: 54px;
    }

    .site-hero:before {
        inset: auto 18px 22px auto;
        width: min(360px, 86vw);
        height: 240px;
    }

    .hero-preview {
        max-width: 560px;
        animation: none;
    }

    .flow,
    .split,
    .feature-list,
    .settings-grid,
    .site-footer,
    .quick-actions,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .site-section h2 {
        font-size: 28px;
    }

    .overview-head h2 {
        font-size: 34px;
    }

    .reveal {
        transform: translateY(18px);
    }
}

@media (max-width: 800px) {
    .app {
        display: block;
    }

    .mobile-side-toggle {
        position: fixed;
        right: 12px;
        top: 12px;
        z-index: 41;
        display: inline-flex;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        padding: 0;
        color: #ecfeff;
        background: rgba(15, 58, 49, .92);
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: 12px;
        box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
    }

    .side-backdrop {
        position: fixed;
        inset: 0;
        z-index: 39;
        background: rgba(15, 23, 42, .48);
    }

    .side {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 40;
        width: min(82vw, 320px);
        height: 100vh;
        transform: translateX(-100%);
        transition: transform .24s ease;
        overflow-y: auto;
    }

    .app.side-collapsed .side,
    .app.side-mobile-open .side {
        width: min(82vw, 320px);
        padding: 24px 16px 28px;
    }

    .app.side-collapsed .side h1,
    .app.side-mobile-open .side h1 {
        display: flex !important;
    }

    .app.side-collapsed .side > div:not(.side-head),
    .app.side-mobile-open .side > div:not(.side-head) {
        display: grid !important;
    }

    .app.side-collapsed .side a,
    .app.side-mobile-open .side a {
        justify-content: flex-start;
        font-size: inherit;
    }

    .app.side-collapsed .side a .nav-icon,
    .app.side-mobile-open .side a .nav-icon,
    .app.side-collapsed .side a .nav-ico,
    .app.side-mobile-open .side a .nav-ico {
        margin-right: 0;
    }

    .app.side-mobile-open .side {
        transform: translateX(0);
    }

    .app.side-mobile-open .side-backdrop {
        display: block;
    }

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

    .main {
        padding: 18px 14px 28px;
    }

    .claim-page {
        display: block;
        padding: 14px;
    }

    .claim-box {
        max-height: none;
        margin: 0 auto;
    }

    .claim-notice {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    table {
        display: block;
        overflow: auto;
    }

    .row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .site-nav nav a {
        font-size: 14px;
    }

    .site-hero h1 {
        font-size: 42px;
    }

    .hero-copy {
        font-size: 16px;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }

    .site-section {
        padding-top: 52px;
        padding-bottom: 52px;
    }

    .actions,
    .inline-form,
    .search-bar,
    .user-hero-panel,
    .page-head {
        display: grid;
        grid-template-columns: 1fr;
    }

    .link-stats {
        grid-template-columns: 1fr;
    }

    .actions input {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *:before,
    *:after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-preview {
        transform: none !important;
    }
}

.home-style-warm .site-hero {
    background:
        linear-gradient(115deg, rgba(255, 255, 255, .9) 0%, rgba(255, 247, 237, .9) 48%, rgba(255, 237, 213, .78) 100%),
        linear-gradient(150deg, #fff7ed 0%, #fef3c7 52%, #fee2e2 100%);
}

.home-style-warm .eyebrow,
.home-style-warm .flow span {
    color: #ea580c;
}

.home-style-warm .button {
    background: #ea580c;
}

.home-style-warm .deploy {
    background: linear-gradient(135deg, #7c2d12 0%, #9a3412 64%, #78350f 100%);
}

.home-style-dark {
    background: #09111f;
}

.home-style-dark .site-nav {
    background: rgba(9, 17, 31, .86);
    border-bottom-color: rgba(148, 163, 184, .18);
}

.home-style-dark .site-brand,
.home-style-dark .site-nav nav,
.home-style-dark .site-hero h1,
.home-style-dark .site-section h2 {
    color: #e5f0ff;
}

.home-style-dark .site-hero {
    color: #e5f0ff;
    background:
        linear-gradient(115deg, rgba(9,17,31,.92), rgba(15,32,51,.82)),
        radial-gradient(circle at 76% 30%, rgba(37,99,235,.34), transparent 34%),
        linear-gradient(150deg, #09111f 0%, #102033 54%, #0f2f2d 100%);
}

.home-style-dark .hero-copy,
.home-style-dark .site-section p {
    color: #b6c7db;
}

.home-style-dark .split,
.home-style-dark .site-footer {
    background: #0c1728;
}

.home-style-dark .flow article,
.home-style-dark .feature-list div,
.home-style-dark .hero-preview {
    background: rgba(15, 32, 51, .9);
    color: #e5f0ff;
    border-color: rgba(148, 163, 184, .2);
}

.home-style-dark .feature-list b,
.home-style-dark .flow h3,
.home-style-dark .footer-brand {
    color: #e5f0ff;
}
