:root {
    --ink: #1b1f23;
    --muted: #667085;
    --line: #d8dee4;
    --panel: #ffffff;
    --page: #f4f7fb;
    --red: #b60000;
    --gold: #ffcc00;
    --blue: #2557a7;
    --green: #147d64;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
}

input,
select,
textarea,
button {
    font: inherit;
}

button,
.primary-btn,
.secondary-btn {
    cursor: pointer;
}

.shell-header,
.front-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 28px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.shell-brand,
.front-title strong {
    color: var(--red);
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
}

.shell-nav,
.front-nav,
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shell-nav a,
.front-nav a,
.admin-tabs a {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}

.shell-main,
.front-main {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 0 48px;
}

.shell-footer {
    width: min(1180px, calc(100% - 28px));
    margin: -28px auto 24px;
    color: #7a8798;
    font-size: 12px;
    text-align: center;
}

.free-powered-by a {
    color: #8f1f1f;
    font-weight: 700;
    text-decoration: none;
}

.free-powered-by a:hover {
    text-decoration: underline;
}

.front-body {
    background: var(--site-bg);
}

.front-header {
    background: var(--site-primary);
    color: #fff;
}

.front-title {
    display: grid;
    gap: 2px;
}

.front-title strong {
    color: #fff;
}

.front-title span {
    font-size: 12px;
    opacity: 0.86;
}

.front-nav a {
    border-color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.top-text-ad {
    display: block;
    min-height: 34px;
    padding: 7px 18px;
    background: var(--site-accent);
    color: #260900;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.install-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(255,255,255,0.95), rgba(255,255,255,0) 28%),
        linear-gradient(135deg, #eaf2fb 0%, #f7fbff 48%, #edf4ee 100%);
}

.install-wrap {
    width: min(1040px, calc(100% - 32px));
    margin: 26px auto;
}

.install-card,
.panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
}

.install-wizard {
    padding: 26px 30px 30px;
    border-color: #cfd9e5;
    box-shadow: 0 22px 50px rgba(25, 54, 92, 0.12);
}

.install-wizard .install-head {
    padding-bottom: 18px;
    border-bottom: 1px solid #e6edf5;
}

.install-wizard .install-head h1 {
    font-size: 30px;
    letter-spacing: 0;
}

.wizard-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 20px 0 22px;
}

.step-tab {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #cfd9e5;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    font-weight: 800;
    text-align: left;
}

.step-tab span {
    display: inline-grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: #e8f2ff;
    color: #1f5aa6;
    font-size: 12px;
}

.step-tab.active {
    border-color: #1f5aa6;
    background: #edf6ff;
    color: #123a6f;
}

.step-tab.active span {
    background: #1f5aa6;
    color: #fff;
}

.step-tab:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

.wizard-step h2 {
    margin: 0 0 14px;
}

.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.inline-buy {
    display: flex;
    gap: 8px;
}

.inline-buy input {
    flex: 1;
}

.buy-link {
    flex: 0 0 auto;
}

.install-progress {
    display: none;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #c7d7ef;
    border-radius: 8px;
    background: #f3f8ff;
}

.progress-line {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #d9e7fb;
}

.progress-line span {
    display: block;
    width: 45%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1f5aa6, #55c0ff);
    animation: install-progress 1.1s ease-in-out infinite alternate;
}

.install-progress ul {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    color: #344054;
    font-size: 12px;
}

.install-success {
    display: grid;
    gap: 16px;
}

.success-badge {
    width: max-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e9f8f4;
    color: #147d64;
    font-size: 12px;
    font-weight: 900;
}

.result-grid {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid #d8dee4;
    border-radius: 8px;
    background: #fbfdff;
}

.result-grid div {
    min-height: 28px;
    color: #111827;
    word-break: break-all;
}

.save-tip {
    margin: 0;
    padding: 12px;
    border-left: 4px solid #b60000;
    background: #fff7ed;
    color: #7a2e00;
    font-weight: 800;
}

@keyframes install-progress {
    from { transform: translateX(-20%); }
    to { transform: translateX(135%); }
}

.template-market {
    padding: 0;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    background: #f6f8fb;
    overflow: hidden;
}

.template-tabs {
    display: flex;
    gap: 0;
    min-height: 46px;
    padding: 0 18px;
    border-bottom: 1px solid #d9e0ea;
    background: #fff;
}

.template-tabs button {
    min-width: 110px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #334155;
    font-size: 14px;
    cursor: pointer;
}

.template-tabs button.active {
    border-bottom-color: #14a267;
    color: #101828;
    font-weight: 700;
}

.template-tab-panel {
    display: none;
    padding: 16px;
}

.template-tab-panel.active {
    display: block;
}

.template-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 22px;
    align-items: start;
}

.template-card {
    display: grid;
    grid-template-rows: 190px auto 38px;
    gap: 10px;
    width: auto;
    min-height: 372px;
    padding: 14px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.template-card.active {
    border-color: #18a66b;
    box-shadow: 0 12px 26px rgba(24, 166, 107, 0.14);
}

.template-preview {
    position: relative;
    height: 190px;
    overflow: hidden;
    border: 1px solid #d8dee8;
    border-radius: 7px;
    background: #e8edf3;
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.template-active-ribbon {
    position: absolute;
    right: 7px;
    top: 7px;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(14, 165, 111, 0.92);
    color: #fff;
    font-size: 12px;
    line-height: 22px;
    font-weight: 700;
}

.template-meta {
    display: grid;
    gap: 6px;
    align-content: start;
    min-width: 0;
}

.template-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.template-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 7px;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.template-code { background: #178be8; }
.template-recommend { background: #ff6b2a; }
.template-local { background: #64748b; }

.template-meta h2 {
    margin: 0;
    color: #1f2937;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.template-meta p {
    margin: 0;
    color: #667085;
    font-size: 12px;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.template-actions {
    display: flex;
    justify-content: center;
    align-items: end;
    min-height: 34px;
}

.template-use,
.template-current {
    min-width: 118px;
    height: 34px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    font-weight: 700;
}

.template-use {
    background: #009b7a;
    cursor: pointer;
}

.template-current {
    background: #eef0f3;
    color: #98a2b3;
    border: 1px solid #d8dde4;
    cursor: not-allowed;
}

.template-cloud-empty {
    display: grid;
    place-items: center;
    min-height: 260px;
    border: 1px dashed #c8d2df;
    border-radius: 8px;
    background: #fff;
    color: #667085;
    text-align: center;
}

.template-cloud-empty strong {
    color: #1f2937;
    font-size: 18px;
}

@media (max-width: 1500px) {
    .template-card-grid {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
    }
}

@media (max-width: 1100px) {
    .template-card-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
}

.dz-install {
    border: 1px solid #8ea4b8;
    background: #f5f7fa;
    color: #26384a;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.dz-install-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 88px;
    padding: 0 26px;
    background: linear-gradient(#4d6982, #28475e);
    color: #fff;
    border-bottom: 4px solid #d8e0e8;
}

.dz-install-head h1 {
    margin: 0 0 8px;
    font-size: 28px;
    letter-spacing: 0;
}

.dz-install-head p {
    margin: 0;
    color: #dce8f2;
}

.dz-install-head span {
    padding: 7px 12px;
    border-radius: 4px;
    background: rgba(255,255,255,0.12);
    color: #dbeafe;
    font-weight: 700;
}

.dz-install-box {
    margin: 18px;
    border: 1px solid #cfd8e3;
    background: #fff;
}

.dz-stepbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid #cfd8e3;
    background: #eef3f8;
}

.dz-stepbar button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    border: 0;
    border-right: 1px solid #d6dee8;
    background: transparent;
    color: #506175;
    cursor: pointer;
}

.dz-stepbar button:last-child {
    border-right: 0;
}

.dz-stepbar button b {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: #cbd5e1;
    color: #fff;
    font-size: 12px;
}

.dz-stepbar button.active {
    background: #fff;
    color: #102a43;
    font-weight: 700;
}

.dz-stepbar button.active b {
    background: #2878bd;
}

.dz-stepbar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dz-step {
    display: none;
    padding: 18px 22px 22px;
}

.dz-step.active {
    display: block;
}

.dz-box-title {
    margin: 0 0 14px;
    padding: 9px 12px;
    border: 1px solid #cdd8e4;
    background: linear-gradient(#f9fbfd, #edf3f8);
    color: #1f3a53;
    font-size: 15px;
    font-weight: 700;
}

.dz-box-title.sub {
    margin-top: 18px;
}

.dz-check-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.dz-check-table th,
.dz-check-table td {
    height: 38px;
    padding: 0 12px;
    border: 1px solid #d9e1ea;
    text-align: left;
    font-size: 13px;
}

.dz-check-table th {
    background: #f0f4f8;
    color: #354b63;
}

.check-ok {
    color: #068347;
    font-weight: 700;
}

.check-bad {
    color: #c92a2a;
    font-weight: 700;
}

.dz-form-table {
    display: grid;
    gap: 0;
    border: 1px solid #d9e1ea;
    border-bottom: 0;
}

.dz-form-table label {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: center;
    min-height: 46px;
    border-bottom: 1px solid #d9e1ea;
    background: #fff;
}

.dz-form-table label > span {
    height: 100%;
    padding: 13px 14px;
    background: #f4f7fa;
    color: #354b63;
    font-weight: 700;
}

.dz-form-table input {
    width: calc(100% - 24px);
    height: 32px;
    margin: 6px 12px;
    padding: 0 9px;
    border: 1px solid #bac8d8;
    border-radius: 3px;
    font-size: 14px;
}

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

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

.dz-note {
    margin: 12px 0 0;
    color: #667085;
    line-height: 1.7;
}

.dz-installing {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    place-items: center;
    margin: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.52);
}

.dz-installing-card {
    width: min(620px, calc(100% - 40px));
    padding: 24px;
    border: 1px solid #bed0e5;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
}

.dz-installing-card strong {
    display: block;
    margin-bottom: 14px;
    color: #1f3a53;
    font-size: 18px;
}

.install-head {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.install-head h1,
.page-head h1,
.panel h1,
.panel h2 {
    margin: 0;
}

.install-head p,
.muted {
    color: var(--muted);
    line-height: 1.7;
}

.pill {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: #e8f2ff;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.check-grid,
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 24px;
}

.check-row,
.stat {
    min-height: 78px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.check-row strong,
.stat span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.check-row.ok {
    border-color: rgba(20, 125, 100, 0.35);
}

.check-row.bad {
    border-color: rgba(180, 35, 24, 0.38);
    background: #fff1f0;
}

.stat strong {
    display: block;
    margin-top: 8px;
    font-size: 26px;
}

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

.form-grid h2,
.span-2 {
    grid-column: 1 / -1;
}

.form-stack {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    outline: 0;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 87, 167, 0.14);
}

input.locked-control,
select.locked-control,
input:disabled,
select:disabled {
    cursor: not-allowed;
    background: #eef2f7;
    color: #7a8699;
}

.primary-btn,
.secondary-btn,
.mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
}

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

.secondary-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.mini-btn {
    min-height: 30px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.mini-btn.danger {
    border-color: var(--danger);
    color: var(--danger);
}

.alert {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 6px;
}

.alert.error {
    background: #fff1f0;
    color: var(--danger);
}

.alert.ok {
    background: #e9f8f4;
    color: var(--green);
}

.flash-toast-stack {
    position: fixed;
    top: 88px;
    right: 26px;
    z-index: 10000;
    display: grid;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
    animation: flash-toast-in .22s ease-out both;
}

.flash-toast {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 11px 14px;
    border: 1px solid #bfe8d0;
    border-radius: 14px;
    background: rgba(244, 251, 247, 0.98);
    color: #0d5f3b;
    box-shadow: 0 16px 38px rgba(16, 24, 40, 0.16);
}

.flash-toast.error {
    border-color: #ffd0c9;
    background: rgba(255, 247, 245, 0.98);
    color: #b42318;
}

.flash-toast span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: #19a66b;
    color: #fff;
    font-weight: 800;
}

.flash-toast.error span {
    background: #ef5b3d;
}

.flash-toast strong {
    min-width: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

.flash-toast-stack.leaving {
    animation: flash-toast-out .28s ease-in both;
}

@keyframes flash-toast-in {
    from { opacity: 0; transform: translate3d(16px, -8px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes flash-toast-out {
    from { opacity: 1; transform: translate3d(0, 0, 0); }
    to { opacity: 0; transform: translate3d(16px, -8px, 0); }
}

.narrow {
    width: min(460px, 100%);
    margin: 42px auto;
}

.auth-shell {
    width: min(520px, calc(100% - 32px));
    margin: 42px auto;
}

.auth-card {
    display: grid;
    gap: 18px;
    padding: 28px 30px 30px;
    border: 1px solid #dce5f1;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 18px 44px rgba(24, 39, 75, 0.1);
}

.auth-brand-mark {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(180deg, #35c982 0%, #159a61 100%);
    color: #fff;
    font-size: 22px;
    font-weight: 900;
}

.admin-auth .auth-brand-mark {
    background: linear-gradient(180deg, #ef4444 0%, #c40000 100%);
}

.auth-head {
    display: grid;
    gap: 5px;
}

.auth-head span {
    color: #0f766e;
    font-size: 13px;
    font-weight: 800;
}

.admin-auth .auth-head span {
    color: #c40000;
}

.auth-head h1 {
    margin: 0;
    color: #101828;
    font-size: 30px;
}

.auth-head p {
    margin: 0;
    color: #667892;
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    color: #526176;
    font-weight: 400;
}

.auth-form input {
    min-height: 44px;
    border-color: #dbe5f0;
    border-radius: 10px;
    font-weight: 400;
}

.captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 10px;
}

.captcha-row strong {
    display: grid;
    min-height: 44px;
    place-items: center;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #f3f8ff;
    color: #1f5aa6;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 3px;
    user-select: none;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.auth-links a {
    color: #1f5aa6;
    font-size: 13px;
    text-decoration: none;
}

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

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.panel {
    margin-bottom: 16px;
    overflow-x: auto;
}

.data-table th,
.data-table td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.data-table th {
    color: var(--muted);
    font-size: 12px;
}

.preview-box {
    min-height: 120px;
    padding: 14px;
    overflow: auto;
    border-radius: 8px;
    background: #111827;
    color: #d1fae5;
    white-space: pre-wrap;
}

.template-banner {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 2px solid var(--site-primary);
    background: #fff;
    color: var(--site-primary);
    font-weight: 800;
}

.publish-table-wrap {
    overflow-x: auto;
    border: 2px solid var(--site-primary);
    background: #fff;
}

.publish-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.publish-table th {
    padding: 7px 8px;
    background: var(--site-primary);
    color: #fff;
    font-size: 13px;
}

.publish-table td {
    padding: 6px 8px;
    border: 1px solid #efd0d0;
    font-size: 13px;
    line-height: 1.35;
}

.publish-table td span {
    display: block;
    color: #6b7280;
    font-size: 12px;
}

.time-cell {
    width: 168px;
    color: var(--site-primary);
    font-weight: 900;
    text-align: center;
}

.publish-table th.col-time,
.publish-table th.col-line,
.publish-table th.col-intro,
.publish-table th.col-status {
    color: #ffc852;
    text-align: center;
    font-weight: 400;
}

.type-all_day_premium td {
    background: #fff3c4;
    color: #7a1600;
    font-weight: 800;
}

.type-all_day_yellow td {
    background: #ffe16a;
}

.status-removed td {
    background: #f3f4f6;
    color: #6b7280;
}

.table-link {
    display: inline-flex;
    min-width: 54px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--site-primary);
    color: #fff;
    text-decoration: none;
}

.classic-board {
    display: grid;
    gap: 8px;
}

.classic-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 70px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-left: 5px solid var(--site-primary);
    background: #fff;
}

.classic-row h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.classic-row p {
    margin: 0;
    color: var(--muted);
}

.classic-time {
    color: var(--site-primary);
    font-weight: 900;
}

.classic-row a,
.night-item a {
    color: var(--site-primary);
    font-weight: 800;
}

.template-night {
    --site-bg: #161922;
    color: #eef2ff;
}

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

.night-item {
    padding: 14px;
    border: 1px solid #374151;
    border-radius: 8px;
    background: #202633;
}

.night-item span {
    color: var(--site-accent);
    font-weight: 900;
}

.night-item strong {
    display: block;
    margin-top: 8px;
    font-size: 18px;
}

.night-item p {
    color: #cbd5e1;
}

.template-options,
.permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.publish-type-picker > span {
    grid-column: 1 / -1;
    color: #445066;
    font-size: 13px;
    font-weight: 800;
}

.publish-type-picker label {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 10px;
    border: 1px solid #d7dfeb;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font-size: 13px;
    font-weight: 900;
}

.publish-type-picker input {
    width: 16px;
    min-height: 16px;
}

.publish-type-picker label:has(input:checked) {
    border-color: #d00000;
    background: #fff1f1;
    color: #b60000;
}

.publish-form {
    align-items: start;
}

.publish-form .publish-form-types {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(112px, 1fr));
    gap: 10px;
    padding: 14px;
    border: 1px solid #dce5f1;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.publish-form .publish-form-types > span {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 1 / -1;
    color: #172033;
    font-size: 14px;
}

.publish-form .publish-form-types > span::before {
    content: "";
    width: 4px;
    height: 15px;
    border-radius: 4px;
    background: #d00000;
}

.publish-form .publish-form-types label {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 58px;
    align-items: center;
    justify-content: start;
    column-gap: 9px;
    row-gap: 1px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(12, 35, 70, 0.03);
    cursor: pointer;
}

.publish-form .publish-form-types input {
    grid-row: 1 / 3;
    width: 16px;
    min-height: 16px;
    margin: 0;
    accent-color: #d00000;
}

.publish-form .publish-form-types strong {
    color: #16223a;
    font-size: 15px;
    line-height: 18px;
}

.publish-form .publish-form-types em {
    color: #7a879a;
    font-size: 12px;
    font-style: normal;
    line-height: 16px;
}

.publish-form .publish-form-types label:has(input:checked) {
    border-color: rgba(208, 0, 0, 0.42);
    background: #fff6f6;
    box-shadow: inset 0 0 0 1px rgba(208, 0, 0, 0.12), 0 8px 20px rgba(208, 0, 0, 0.08);
}

.publish-form .publish-form-types label:has(input:checked) strong {
    color: #c40000;
}

.publish-form .publish-compact-field {
    min-height: 78px;
    padding: 12px 14px;
    border: 1px solid #dce5f1;
    border-radius: 12px;
    background: #fff;
}

.publish-form .publish-settings-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr);
    gap: 10px;
}

.publish-form .publish-compact-field input,
.publish-form .publish-compact-field select {
    min-height: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
}

.publish-form .publish-source-field {
    gap: 9px;
}

.publish-form .publish-source-field textarea {
    min-height: 190px;
    max-height: 300px;
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
}

.publish-form > button {
    min-height: 40px;
    border-radius: 8px;
}

.template-option {
    min-width: 180px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

/* Modern admin console */
.admin-body {
    min-height: 100vh;
    margin: 0;
    background: #eef3f8;
    color: #172033;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.admin-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100vh;
    padding: 22px 18px;
    background: linear-gradient(180deg, #141f33 0%, #0d1424 100%);
    color: #dbe7ff;
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 6px 22px;
    color: #fff;
    text-decoration: none;
}

.admin-brand span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    background: #d60000;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.admin-brand strong {
    font-size: 20px;
}

.admin-menu {
    display: grid;
    gap: 7px;
    align-content: start;
    padding-bottom: 8px;
}

.admin-menu a,
.admin-menu-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #c8d5ef;
    text-decoration: none;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.admin-menu a:hover,
.admin-menu a.active,
.admin-menu-toggle:hover,
.admin-menu-toggle.active {
    background: #ffffff;
    color: #b60000;
}

.admin-menu i,
.admin-menu-toggle i {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 7px;
    background: rgba(255,255,255,0.09);
    color: inherit;
    font-size: 12px;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
}

.admin-menu a.active i,
.admin-menu a:hover i,
.admin-menu-toggle.active i,
.admin-menu-toggle:hover i {
    background: #fff1f1;
}

.admin-menu-toggle span {
    flex: 1;
}

.admin-menu-toggle b {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    opacity: .72;
    transition: transform .16s ease;
}

.admin-menu-toggle.open b {
    transform: rotate(45deg);
}

.admin-body .admin-menu .admin-menu-toggle {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) 12px !important;
    align-items: center !important;
    justify-items: start !important;
    column-gap: 10px !important;
    width: 100% !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

.admin-body .admin-menu .admin-menu-toggle .admin-menu-label {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    color: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 42px !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.admin-body .admin-menu .admin-menu-toggle i {
    grid-column: 1 !important;
    align-self: center !important;
    justify-self: center !important;
}

.admin-body .admin-menu .admin-menu-toggle b {
    grid-column: 3 !important;
    align-self: center !important;
    justify-self: center !important;
}

.admin-body .admin-menu .admin-menu-toggle.active {
    background: rgba(255,255,255,0.08) !important;
    color: #ffffff !important;
    box-shadow: inset 2px 0 0 #ff4d4f !important;
}

.admin-body .admin-menu .admin-menu-toggle:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #ffffff !important;
}

.admin-body .admin-menu .admin-menu-toggle.active i,
.admin-body .admin-menu .admin-menu-toggle:hover i {
    background: rgba(255,255,255,0.16) !important;
    color: #ffffff !important;
}

.admin-submenu {
    display: grid;
    gap: 3px;
    margin: -2px 0 6px 36px;
    padding-left: 12px;
    border-left: 1px solid rgba(255,255,255,0.12);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-4px);
    transition: max-height .18s ease, opacity .14s ease, transform .18s ease;
}

.admin-submenu.open {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
}

.admin-submenu a {
    min-height: 28px;
    padding: 0 9px;
    border-radius: 7px;
    color: #9fb0cc;
    font-size: 12px;
}

.admin-submenu a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.admin-submenu a.active {
    background: rgba(255,255,255,0.16);
    color: #ffffff;
    box-shadow: inset 2px 0 0 #ff6b6b;
}

.admin-side-card {
    position: static;
    margin-top: auto;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
}

.admin-side-card span,
.admin-side-card small {
    display: block;
    color: #93a4c3;
    font-size: 12px;
}

.admin-side-card strong {
    display: block;
    margin: 6px 0 2px;
    color: #fff;
}

.admin-workspace {
    min-width: 0;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    padding: 0 30px;
    border-bottom: 1px solid #dde5ef;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
}

.admin-topbar strong {
    display: block;
    margin-top: 3px;
    font-size: 20px;
}

.admin-kicker {
    color: #7a8699;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-topbar nav {
    display: flex;
    gap: 8px;
}

.admin-topbar nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid #d7dfeb;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font-size: 13px;
    text-decoration: none;
}

.admin-topbar nav .logout-link {
    color: #b60000;
}

.admin-main {
    width: min(1500px, calc(100% - 36px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.admin-body .page-head {
    align-items: center;
    margin-bottom: 18px;
}

.admin-body .page-head h1 {
    margin: 5px 0 0;
    font-size: 28px;
}

.admin-body .page-head .muted {
    margin: 6px 0 0;
}

.admin-body .pill {
    min-height: 24px;
    background: #fff1f1;
    color: #b60000;
}

.admin-body .panel,
.admin-body .stat,
.admin-card {
    border: 1px solid #dce3ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(24, 39, 75, 0.06);
}

.admin-body .panel {
    padding: 18px;
}

.admin-body .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 18px;
}

.admin-body .stat {
    min-height: 112px;
    padding: 18px;
}

.admin-body .stat span {
    color: #6a7689;
}

.admin-body .stat strong {
    margin-top: 12px;
    font-size: 32px;
    color: #111827;
}

.admin-tabs {
    display: none;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.admin-body .primary-btn,
.admin-body .secondary-btn,
.admin-body .mini-btn {
    border-radius: 8px;
}

.admin-body .primary-btn {
    border-color: #d00000;
    background: #d00000;
}

.admin-body .secondary-btn,
.admin-body .mini-btn {
    border-color: #d7dfeb;
}

.admin-body .mini-btn.danger,
.admin-body .secondary-btn.danger {
    border-color: #f0b4b4;
    color: #b60000;
}

.admin-body input,
.admin-body select,
.admin-body textarea {
    border-color: #d7dfeb;
    border-radius: 8px;
}

.admin-body label {
    color: #445066;
}

.admin-body .form-grid {
    gap: 16px;
}

.admin-body .form-grid h2 {
    margin: 12px 0 0;
    padding-top: 16px;
    border-top: 1px solid #edf1f6;
    color: #111827;
    font-size: 18px;
}

.admin-body .data-table {
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-body .data-table th,
.admin-body .data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf1f6;
    font-size: 13px;
    vertical-align: middle;
}

.admin-body .data-table th {
    background: #f8fafc;
    color: #5d6b82;
    font-weight: 900;
}

.admin-body .data-table tbody tr:hover td {
    background: #fffafa;
}

.admin-body .target-table td form {
    display: inline-flex;
    margin: 3px 3px 0 0;
}

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

.admin-search-note {
    color: #6b7280;
    font-size: 13px;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1f5aa6;
    font-size: 12px;
    font-weight: 800;
}

.status-chip.danger {
    background: #fff1f1;
    color: #b60000;
}

.status-chip.ok {
    background: #e9f8f4;
    color: #147d64;
}

.status-chip.warn {
    background: #fff7e6;
    color: #b45309;
}

.template-option {
    border-radius: 12px;
}

.admin-empty {
    padding: 28px;
    color: #778296;
    text-align: center;
}

.license-state {
    font-size: 26px !important;
    line-height: 1.25;
}

.dashboard-feed-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 18px;
}

.license-feed-panel {
    min-height: 230px;
}

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

.feed-item,
.feed-empty {
    display: grid;
    gap: 5px;
    min-height: 58px;
    padding: 12px 14px;
    border: 1px solid #edf1f6;
    border-radius: 10px;
    background: #f8fafc;
    color: #172033;
    text-decoration: none;
}

.feed-item:hover {
    border-color: #f0b4b4;
    background: #fffafa;
}

button.feed-item {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.feed-title-only {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 44px;
    align-items: center;
}

.feed-item strong {
    font-size: 14px;
}

.feed-item em {
    color: #8a98ab;
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
}

.feed-item span,
.feed-empty {
    color: #667085;
    font-size: 13px;
    line-height: 1.6;
}

.ad-item {
    border-color: #ffe1a8;
    background: #fffaf0;
}

.ad-item:hover {
    background: #fff4dc;
}

.feed-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.feed-pager button {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    background: #ffffff;
    color: #344054;
    cursor: pointer;
}

.feed-pager button:disabled {
    color: #98a2b3;
    cursor: not-allowed;
}

.feed-pager span {
    color: #667085;
    font-size: 13px;
}

.dashboard-feed-dialog {
    width: min(720px, calc(100vw - 32px));
}

.dashboard-feed-content {
    max-height: min(62vh, 560px);
    overflow: auto;
    padding: 14px 2px 2px;
    color: #172033;
    line-height: 1.75;
}

.dashboard-feed-content img {
    max-width: 100%;
    height: auto;
}

.update-permission-dialog {
    width: min(680px, calc(100vw - 32px));
}

.update-permission-box {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #ffd2d2;
    border-radius: 8px;
    background: #fff7f7;
}

.update-permission-box strong {
    display: block;
    margin-bottom: 8px;
    color: #b42318;
}

.update-permission-box ul {
    margin: 0;
    padding-left: 18px;
    color: #344054;
    font-size: 13px;
    line-height: 1.7;
}

.update-permission-box textarea {
    width: 100%;
    min-height: 150px;
    resize: vertical;
    padding: 10px 12px;
    border: 1px solid #f3b6b6;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
}

.copy-command-tip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-left: 10px;
    color: #b42318;
    font-size: 13px;
}

.update-progress-dialog {
    width: min(560px, calc(100vw - 32px));
}

.update-progress-dialog h2 {
    transition: color .2s ease;
}

.update-progress-track {
    height: 8px;
    margin: 18px 0;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f7;
}

.update-progress-track span {
    display: block;
    width: 14%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d80000, #ff7a45);
    transition: width .35s ease;
}

.update-progress-steps {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.update-progress-steps li {
    position: relative;
    min-height: 30px;
    padding: 6px 10px 6px 36px;
    border: 1px solid #e4ebf5;
    border-radius: 8px;
    background: #fbfdff;
    color: #667085;
    font-size: 13px;
}

.update-progress-steps li::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    border-radius: 50%;
    background: #cbd5e1;
}

.update-progress-steps li.active {
    border-color: #f7b4b4;
    background: #fff7f7;
    color: #b42318;
}

.update-progress-steps li.active::before {
    background: #d80000;
    box-shadow: 0 0 0 5px rgba(216, 0, 0, .12);
    animation: updatePulse 1s ease-in-out infinite;
}

.update-progress-steps li.done {
    border-color: #b7e4c7;
    background: #f0fff5;
    color: #157347;
}

.update-progress-steps li.done::before {
    background: #16a34a;
}

.update-progress-steps li.error {
    border-color: #ffb4b4;
    background: #fff1f1;
    color: #b42318;
}

.update-progress-steps li.error::before {
    background: #d80000;
}

.update-progress-modal.is-success .update-progress-dialog h2,
.update-progress-modal.is-success .update-progress-dialog > .ad-time-sub {
    color: #157347;
}

.update-progress-modal.is-success .update-progress-track span {
    background: #16a34a;
}

.update-progress-success-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #b7e4c7;
    border-radius: 8px;
    background: #f0fff5;
    color: #157347;
    font-size: 13px;
}

.update-progress-success-actions[hidden] {
    display: none;
}

@keyframes updatePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: .72; }
}

/* Ad manager first pass */
.ad-page-head {
    margin-bottom: 14px !important;
}

.ad-manager-panel {
    padding: 14px !important;
    border-radius: 4px !important;
    box-shadow: 0 8px 24px rgba(24, 39, 75, 0.04) !important;
}

.ad-filter-bar {
    display: grid;
    grid-template-columns: 300px 300px 300px 300px 64px;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
    padding: 10px;
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
}

.ad-filter-bar label {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 0;
    min-height: 38px;
    color: #3c4657;
    font-size: 13px;
    font-weight: 400;
}

.ad-filter-bar label span {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dedede;
    border-right: 0;
    background: #fff;
}

.ad-filter-bar input,
.ad-filter-bar select {
    min-height: 38px;
    border: 1px solid #dedede;
    border-radius: 0;
    background: #fff;
    color: #4b5563;
}

.ad-search-btn {
    height: 38px;
    border: 0;
    border-radius: 2px;
    background: #009688;
    color: #fff;
    font-weight: 800;
}

.ad-list-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 10px 14px;
    border: 1px solid #e5e5e5;
    border-bottom: 0;
    background: #f8f8f8;
}

.ad-list-toolbar span {
    margin-left: auto;
    color: #667085;
    font-size: 13px;
}

.ad-danger-btn {
    min-height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 2px;
    background: #009688;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.ad-danger-btn.ghost {
    background: #0f9f91;
}

.ad-table-wrap {
    overflow: auto;
    border: 1px solid #e5e5e5;
    background: #fff;
    max-height: calc(100vh - 290px);
}

.ad-table {
    width: 100%;
    min-width: 1320px;
    border-collapse: collapse;
    background: #fff;
}

.ad-table th,
.ad-table td {
    padding: 9px 12px;
    border-right: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    color: #344054;
    font-size: 13px;
    line-height: 1.35;
    text-align: left;
    vertical-align: middle;
}

.ad-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f2f2f2;
    color: #4b5563;
    font-weight: 700;
}

.ad-table td:first-child,
.ad-table th:first-child {
    width: 46px;
    text-align: center;
}

.ad-table td:nth-child(2),
.ad-table th:nth-child(2),
.ad-table td:nth-child(5),
.ad-table th:nth-child(5),
.ad-table td:nth-child(6),
.ad-table th:nth-child(6),
.ad-table td:nth-child(7),
.ad-table th:nth-child(7) {
    text-align: center;
}

.ad-table tbody tr:hover td {
    background: #fbfffe;
}

.ad-server-name {
    min-width: 0;
    color: #172033 !important;
    font-weight: 700;
}

.ad-muted {
    color: #98a2b3;
}

.ad-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 2px;
    background: #ffb400;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.ad-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 48px;
    height: 24px;
    padding: 0 7px 0 22px;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    background: #fff;
    color: #98a2b3;
    font-size: 12px;
    position: relative;
}

.ad-switch:before {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #c9c9c9;
}

.ad-switch.on {
    border-color: #54bd7f;
    background: #54bd7f;
    color: #fff;
}

.ad-switch.on:before {
    left: auto;
    right: 4px;
    background: #fff;
}

.ad-row-actions {
    min-width: 198px;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
}

.ad-row-actions form {
    display: inline-flex;
    margin: 0 4px 0 0;
}

.ad-edit-btn,
.ad-time-btn,
.ad-delete-btn,
.ad-warn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 8px;
    border: 0;
    border-radius: 2px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.ad-edit-btn {
    background: #009688;
}

.ad-time-btn {
    background: #2f80ed;
}

.ad-time-btn.has-schedule {
    background: #dc2626 !important;
    color: #fff !important;
}

.ad-time-btn.is-disabled,
.ad-time-btn:disabled {
    background: #cbd5e1 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    opacity: .88 !important;
}

.ad-warn-btn {
    background: #ff8a00;
}

.ad-delete-btn {
    background: #ff5722;
}

.ad-time-modal[hidden] {
    display: none !important;
}

.ad-time-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.38);
}

.ad-time-dialog {
    position: relative;
    width: min(560px, 96vw);
    padding: 22px;
    border: 1px solid #dfe7f1;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.ad-time-dialog h2 {
    margin: 0 0 6px;
    color: #10233f;
    font-size: 22px;
    font-weight: 400;
}

.ad-time-sub,
.ad-time-current {
    margin: 0 0 12px;
    color: #667085;
    font-size: 13px;
}

.ad-time-current {
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f9ff;
}

.ad-time-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: #eef3f8;
    color: #526176;
    cursor: pointer;
}

.ad-time-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0;
}

.ad-time-tabs label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #fbfdff;
    color: #344054;
    font-weight: 400;
}

.ad-time-now,
.ad-time-schedule {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
    color: #344054;
    font-size: 13px;
    font-weight: 400;
}

.ad-time-now select,
.ad-time-schedule textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    font-weight: 400;
}

.ad-time-schedule textarea {
    padding: 10px 12px;
    line-height: 1.5;
    resize: vertical;
}

.ad-time-schedule span {
    color: #7b8797;
    font-size: 12px;
}

.ad-time-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
}

.ad-time-actions button {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 400;
}

/* Ad manager polished controls */
.ad-manager-panel {
    overflow: visible !important;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,1)),
        #fff !important;
}

.ad-filter-bar {
    grid-template-columns: 0.95fr 0.78fr 0.9fr 0.78fr 0.7fr 0.55fr 72px !important;
    padding: 10px 12px !important;
    border: 1px solid #e3e9f2 !important;
    border-radius: 12px !important;
    background: #f7fafc !important;
}

.ad-filter-bar label {
    grid-template-columns: 78px minmax(0, 1fr) !important;
    min-height: 34px !important;
    overflow: hidden;
    border-radius: 9px;
    box-shadow: 0 1px 0 rgba(16,24,40,0.03);
}

.ad-filter-bar label span {
    border-color: #dbe4ef !important;
    background: #edf3f9 !important;
    color: #40516b;
    font-weight: 800;
}

.ad-filter-bar input,
.ad-filter-bar select {
    min-height: 34px !important;
    padding: 6px 8px !important;
    border-color: #dbe4ef !important;
    background: #fff !important;
}

.ad-per-page-top {
    grid-template-columns: 52px minmax(0, 1fr) !important;
}

.ad-search-btn {
    height: 34px !important;
    border-radius: 9px !important;
    background: linear-gradient(180deg, #15a394, #078678) !important;
    box-shadow: 0 8px 18px rgba(8,134,120,0.2);
}

.ad-list-toolbar {
    margin-top: 4px;
    border: 1px solid #e3e9f2 !important;
    border-radius: 12px 12px 0 0 !important;
    background: #fbfcff !important;
}

.ad-list-toolbar form {
    display: inline-flex;
    gap: 8px;
}

.ad-danger-btn {
    min-height: 34px !important;
    border-radius: 8px !important;
    background: #168c7f !important;
}

.ad-danger-btn.ghost {
    background: #3b82b8 !important;
}

.ad-danger-btn.danger {
    background: #d33a2c !important;
}

.ad-danger-btn.status {
    background: #7c3aed !important;
}

.ad-danger-btn:disabled {
    cursor: not-allowed;
    background: #cbd5e1 !important;
    color: #64748b !important;
}

.ad-date-filter {
    cursor: pointer;
}

.ad-date-filter input {
    cursor: pointer;
}

.ad-table-wrap {
    border: 1px solid #e3e9f2 !important;
    border-top: 0 !important;
    border-radius: 0 0 12px 12px;
    max-height: calc(100vh - 330px) !important;
}

.ad-manager-table {
    min-width: 1380px !important;
    table-layout: fixed;
}

.ad-manager-table th {
    background: #f3f6fa !important;
    color: #344054 !important;
    font-size: 12px !important;
    text-align: center !important;
    white-space: nowrap;
}

.ad-manager-table td {
    padding: 9px 8px !important;
    color: #263244 !important;
    font-size: 13px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ad-manager-table tbody tr:nth-child(even) td {
    background: #fcfdff;
}

.ad-manager-table tbody tr:hover td {
    background: #f2fbf9 !important;
}

.ad-manager-table th:nth-child(1),
.ad-manager-table td:nth-child(1) { width: 36px; }
.ad-manager-table th:nth-child(2),
.ad-manager-table td:nth-child(2) { width: 48px; }
.ad-manager-table th:nth-child(3),
.ad-manager-table td:nth-child(3) { width: 120px; }
.ad-manager-table th:nth-child(4),
.ad-manager-table td:nth-child(4) { width: 112px; }
.ad-manager-table th:nth-child(5),
.ad-manager-table td:nth-child(5),
.ad-manager-table th:nth-child(6),
.ad-manager-table td:nth-child(6) { width: 54px; }
.ad-manager-table th:nth-child(7),
.ad-manager-table td:nth-child(7) { width: 62px; }
.ad-manager-table th:nth-child(8),
.ad-manager-table td:nth-child(8) { width: 84px; }
.ad-manager-table th:nth-child(9),
.ad-manager-table td:nth-child(9) { width: 116px; }
.ad-manager-table th:nth-child(10),
.ad-manager-table td:nth-child(10),
.ad-manager-table th:nth-child(11),
.ad-manager-table td:nth-child(11),
.ad-manager-table th:nth-child(12),
.ad-manager-table td:nth-child(12),
.ad-manager-table th:nth-child(13),
.ad-manager-table td:nth-child(13) { width: 76px; }
.ad-manager-table th:nth-child(14),
.ad-manager-table td:nth-child(14) { width: 140px; }
.ad-manager-table th:nth-child(15),
.ad-manager-table td:nth-child(15) { width: 170px; }

.ad-manager-table input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    min-height: 0 !important;
    padding: 0 !important;
}

.ad-id-cell {
    color: #8090a7 !important;
    font-weight: 800;
    text-align: center !important;
}

.ad-manager-table td:nth-child(4),
.ad-manager-table td:nth-child(5),
.ad-manager-table td:nth-child(6),
.ad-manager-table td:nth-child(7),
.ad-manager-table td:nth-child(8),
.ad-manager-table td:nth-child(9),
.ad-manager-table td:nth-child(10),
.ad-manager-table td:nth-child(11),
.ad-manager-table td:nth-child(12),
.ad-manager-table td:nth-child(13),
.ad-manager-table td:nth-child(14) {
    text-align: center;
}

.ad-view-link {
    color: #126fbe;
    font-weight: 900;
    text-decoration: none;
}

.ad-type-badge,
.ad-state {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.ad-type-badge {
    background: #eef4ff;
    color: #315ca8;
}

.ad-type-badge.type-all_day_yellow {
    background: #fff7d6;
    color: #9a5b00;
}

.ad-type-badge.type-all_day_premium {
    background: #fff0f7;
    color: #b01864;
}

.ad-type-badge.type-overnight_recommend {
    background: #f2edff;
    color: #6242a6;
}

.ad-type-cell {
    overflow: visible !important;
    text-overflow: clip !important;
    padding-right: 2px !important;
    padding-left: 2px !important;
}

.ad-type-list {
    display: flex;
    width: 100%;
    min-width: 0;
    gap: 2px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    overflow: visible;
    white-space: nowrap;
    background: transparent;
}

.ad-type-list .ad-type-badge {
    flex: 0 0 auto;
    min-height: 18px;
    padding: 0 4px;
    font-size: 10px;
}

.ad-manager-table td:nth-child(9) {
    padding-right: 2px !important;
    padding-left: 2px !important;
}

.ad-manager-table td:nth-child(14) {
    overflow: visible;
    text-overflow: clip;
}

.ad-state.active {
    background: #e8f8f2;
    color: #08745f;
}

.ad-state.pending {
    background: #eef4ff;
    color: #2656a3;
}

.ad-state.active-today {
    background: #e8f8f2;
    color: #08745f;
}

.ad-state.active-days {
    background: #fff7df;
    color: #9a5b00;
}

.ad-state.removed {
    background: #fff1f1;
    color: #b60000;
}

.ad-state.expired {
    background: #f1f5f9;
    color: #64748b;
}

.ad-switch-form {
    display: inline-flex;
    margin: 0;
}

.ad-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    width: 54px;
    height: 26px;
    padding: 0 8px 0 25px;
    border: 0;
    border-radius: 999px;
    background: #d7dee8;
    color: #6d7c90;
    font-size: 12px;
    font-weight: 900;
    transition: background .16s ease, color .16s ease;
}

.ad-toggle span {
    position: absolute;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(16,24,40,0.18);
    transition: left .16s ease;
}

.ad-toggle.on {
    justify-content: flex-start;
    padding: 0 25px 0 8px;
    background: #17a574;
    color: #fff;
}

.ad-toggle.on span {
    left: 32px;
}

.ad-toggle.is-disabled,
.ad-toggle:disabled {
    cursor: not-allowed;
    background: #c9ced8 !important;
    color: #7f8794 !important;
    opacity: .72;
}

.ad-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding: 12px 4px 0;
    color: #6b7687;
    font-size: 13px;
}

.ad-pagination nav {
    display: flex;
    gap: 6px;
}

.ad-pagination a {
    display: inline-flex;
    min-width: 34px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid #dce4ef;
    border-radius: 8px;
    background: #fff;
    color: #344054;
    font-weight: 800;
    text-decoration: none;
}

.ad-pagination a.active {
    border-color: #168c7f;
    background: #168c7f;
    color: #fff;
}

.ad-pagination a.disabled {
    cursor: not-allowed;
    opacity: .45;
}

@media (max-width: 960px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .admin-side-card {
        position: static;
        margin-top: 14px;
    }

    .admin-topbar,
    .admin-body .page-head {
        align-items: stretch;
        flex-direction: column;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .admin-main {
        width: min(100% - 24px, 1280px);
    }

    .admin-body .stat-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .shell-header,
    .front-header,
    .page-head,
    .template-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .check-grid,
    .stat-grid,
    .form-grid,
    .night-grid,
    .classic-row {
        grid-template-columns: 1fr;
    }
}

/* 117my-style publishing table refinements */
.front-header {
    padding: 8px 18px;
    border-bottom: 4px solid #7a0000;
}

.top-ad-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    width: min(1180px, calc(100% - 12px));
    margin: 6px auto 0;
}

.top-text-ad {
    display: flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border: 1px solid #d89000;
    font-size: 13px;
}

.site-table-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 10px;
    border: 2px solid var(--site-primary);
    background: #fff0b6;
    color: var(--site-primary);
    font-size: 13px;
    font-weight: 800;
}

.publish-table-wrap {
    background: #fff6c8;
}

.publish-table {
    min-width: 1120px;
}

.publish-table th {
    padding: 6px 5px;
    border: 1px solid #7e0000;
    font-size: 12px;
    white-space: nowrap;
}

.publish-table td {
    padding: 4px 5px;
    border: 1px solid #d98a00;
    background: #fff8cf;
    font-size: 12px;
    line-height: 1.28;
    vertical-align: middle;
}

.server-cell {
    width: 150px;
}

.server-cell strong {
    display: block;
    color: #b60000;
}

.server-cell em {
    display: block;
    color: #116329;
    font-size: 11px;
    font-style: normal;
}

.time-cell {
    width: 118px;
}

.intro-cell {
    min-width: 260px;
}

.star-cell {
    width: 90px;
    color: #d60000;
    font-weight: 900;
    text-align: center;
}

.plain-cell {
    color: #222;
    font-weight: 700;
}

.type-all_day_premium td {
    background: #ffd6e7;
}

.table-link {
    min-width: 48px;
    min-height: 24px;
    border-radius: 2px;
    font-size: 12px;
}

.download-link {
    background: #0b6d36;
}

.preview-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    background: #fff;
    color: #111827;
    white-space: normal;
}

.preview-table th,
.preview-table td {
    padding: 7px 8px;
    border: 1px solid #cbd5e1;
    font-size: 12px;
    text-align: left;
}

.preview-table th {
    background: #fef3c7;
}

.parse-error {
    color: #fecaca;
    font-weight: 800;
}

.target-table {
    min-width: 1180px;
}

.target-table td {
    font-size: 12px;
}

.bulk-actions {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.target-table td form {
    display: inline-flex;
    margin: 2px 0 0 4px;
    vertical-align: middle;
}

.target-table th:first-child,
.target-table td:first-child {
    width: 34px;
    text-align: center;
}

@media (max-width: 780px) {
    .top-ad-grid {
        grid-template-columns: 1fr;
    }
}

/* Final 117my-like front page */
.front-body {
    background: var(--site-bg);
}

.legacy-site-shell {
    width: 990px;
    margin: 0 auto;
    background: #fff4b6;
    border-left: 1px solid #001a3f;
    border-right: 1px solid #001a3f;
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
}

.legacy-hero {
    height: 136px;
    overflow: hidden;
    background: #102d60;
    border-bottom: 3px solid #5a0000;
}

.legacy-hero img {
    display: block;
    width: 100%;
    height: 136px;
    object-fit: cover;
}

.default-banner {
    display: grid;
    height: 136px;
    place-items: center;
    background: linear-gradient(#1f4f95, #081b42);
    color: #ffe77a;
    text-align: center;
}

.default-banner strong {
    display: block;
    font-size: 42px;
    line-height: 1;
    text-shadow: 2px 2px 0 #610000;
}

.default-banner span {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: 18px;
}

.legacy-nav {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 5px 8px;
    background: #5d0909;
    color: #ffe69a;
    font-size: 12px;
}

.legacy-nav a {
    color: #ffe69a;
    text-decoration: none;
}

.notice-strip {
    padding: 5px 8px;
    background: #111;
    color: #ffe600;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.download-strip {
    padding: 5px 8px;
    background: #fff2aa;
    color: #d00000;
    border-bottom: 1px solid #9a6a00;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

.legacy-ad-lines {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    padding: 2px;
    background: #8c0000;
}

.legacy-ad-lines a {
    min-height: 24px;
    padding: 4px 5px;
    background: #fff5bd;
    color: #8b0000;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.legacy-main {
    padding: 0 4px 8px;
}

.front-main {
    width: auto;
    margin: 0;
    padding: 0;
}

.publish-table-wrap {
    border: 2px solid #5d0909;
    background: #f8d86d;
}

.publish-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    table-layout: fixed;
}

.publish-table th {
    padding: 5px 3px;
    background: #6b0808;
    color: #ffe66a;
    border: 1px solid #2c0000;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
}

.publish-table td {
    padding: 4px 4px;
    background: #fff1a6;
    border: 1px solid #b66c00;
    color: #320000;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

.publish-table tbody tr:hover td {
    background: var(--front-hover-color);
}

.publish-table .col-server { width: 142px; }
.publish-table .col-login { width: 112px; }
.publish-table .col-time { width: 142px; }
.publish-table .col-line { width: 92px; }
.publish-table .col-client { width: 78px; }
.publish-table .col-intro { width: 258px; }
.publish-table .col-site { width: 70px; }
.publish-table .col-status { width: 112px; }

.publish-table td.col-server { text-align: left; }
.publish-table td.col-login { text-align: center; }
.publish-table td.col-time { text-align: center; }
.publish-table td.col-line { text-align: left; }
.publish-table td.col-client { text-align: center; }
.publish-table td.col-intro { text-align: left; }
.publish-table td.col-site { text-align: center; }
.publish-table td.col-status { text-align: center; }

.server-cell a,
.login-cell a,
.site-cell a {
    color: #002a8f;
    font-weight: 800;
    text-decoration: none;
}

.server-cell span {
    font-weight: 800;
}

.front-rec-icon {
    display: inline-block;
    margin: 0;
    padding: 0;
    border: 0;
    vertical-align: -2px;
}

.recommend-tail {
    display: inline;
    color: #e00000;
    font-weight: 400;
    white-space: nowrap;
}

.status-cell {
    font-weight: 900;
}

.status-open { color: var(--status-open-color); }
.status-new { color: var(--status-new-color); }
.status-today-open { color: var(--status-today-open-color); }
.status-today-wait { color: var(--status-today-wait-color); }
.status-tomorrow-wait { color: var(--status-tomorrow-wait-color); }
.status-after-tomorrow-wait { color: var(--status-after-tomorrow-wait-color); }
.status-overnight { color: var(--status-overnight-color); }
.status-yellow { color: var(--status-yellow-color); }
.status-premium { color: var(--status-premium-color); }

.time-cell,
.publish-table td.col-time {
    font-weight: 400;
}

.type-all_day_premium td,
.type-all_day_yellow td,
.type-all_day_premium td a,
.type-all_day_yellow td a,
.type-all_day_premium .server-cell span,
.type-all_day_yellow .server-cell span,
.current-slot-row td,
.current-slot-row td a,
.current-slot-row .server-cell span,
.current-slot-row .status-cell,
.current-slot-row .time-cell {
    color: #d00000;
    font-weight: 400;
    height: 30px !important;
    line-height: 28px !important;
}

.publish-table tbody tr.date-divider td {
    padding: 5px;
    background: #760606 !important;
    color: #ffe66a;
    border-color: #2c0000;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.quick-filter {
    position: fixed;
    top: 220px;
    left: calc(50% + 560px);
    width: 72px;
    border: 1px solid #320000;
    background: #fff0a0;
    color: #5d0909;
    font-size: 12px;
    text-align: center;
    z-index: 20;
}

.quick-filter strong {
    display: block;
    padding: 5px 2px;
    background: #6b0808;
    color: #ffe66a;
}

.quick-filter button {
    display: block;
    width: 100%;
    padding: 5px 2px;
    border: 0;
    border-top: 1px solid #d18a00;
    background: transparent;
    color: #5d0909;
    font-size: 12px;
}

.notice-strip {
    height: 30px !important;
    padding: 0 10px !important;
    line-height: 30px !important;
    text-align: center !important;
}

.notice-strip .download-hot,
.notice-strip a {
    color: #ff0000 !important;
    font-weight: 900 !important;
    text-decoration: underline !important;
}

.download-strip {
    height: 18px !important;
    padding: 0 8px !important;
    line-height: 18px !important;
}

.publish-table th {
    height: 27px !important;
    line-height: 27px !important;
    background: #5a0d00 !important;
    border-color: #2f0600 !important;
}

.publish-table td {
    height: 25px !important;
    padding: 0 4px !important;
    border-color: #806000 !important;
    line-height: 23px !important;
}

.publish-table tbody tr.date-divider td {
    height: 26px !important;
    line-height: 26px !important;
    background: #5a0d00 !important;
    color: #ffff66 !important;
    text-align: center !important;
}

.legacy-footer {
    padding: 14px 30px 18px !important;
    background: #8f0900 !important;
    color: #fff6d0 !important;
    font-size: 12px !important;
    line-height: 22px !important;
    text-align: center !important;
}

.legacy-footer a {
    color: #ffffff !important;
    text-decoration: none !important;
}

@media (max-width: 1120px) {
    .legacy-site-shell {
        width: 100%;
    }

    .quick-filter {
        display: none;
    }
}

html,
body.front-body {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
}

.legacy-site-shell,
.legacy-main,
.publish-table-wrap {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

.legacy-site-shell {
    width: 980px !important;
    min-width: 980px !important;
    max-width: 980px !important;
}

@media (max-width: 1120px) {
    html,
    body.front-body {
        overflow-x: auto !important;
    }

    .legacy-site-shell {
        width: 980px !important;
        max-width: 980px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .quick-filter {
        display: none !important;
    }
}

/* Compact smart publish form */
.admin-body input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    position: relative !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin: 0 !important;
    display: inline-block !important;
    box-sizing: border-box !important;
    border: 1px solid #b9c2d0 !important;
    border-radius: 4px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%) !important;
    box-shadow: inset 0 1px 1px rgba(16, 24, 40, 0.05) !important;
    cursor: pointer !important;
    vertical-align: middle !important;
}

.admin-body input[type="checkbox"]::after {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 8px !important;
    height: 4px !important;
    border-left: 2px solid #fff !important;
    border-bottom: 2px solid #fff !important;
    transform: translate(-50%, -55%) rotate(-45deg) scale(0) !important;
    transform-origin: center !important;
    transition: transform 0.12s ease !important;
}

.admin-body input[type="checkbox"]:checked {
    border-color: #55b978 !important;
    background: linear-gradient(180deg, #8ee7ad 0%, #43c978 100%) !important;
    box-shadow: 0 3px 8px rgba(67, 201, 120, 0.22) !important;
}

.admin-body input[type="checkbox"]:checked::after {
    transform: translate(-50%, -55%) rotate(-45deg) scale(1) !important;
}

.admin-body input[type="checkbox"]:focus {
    outline: 0 !important;
    box-shadow: 0 0 0 3px rgba(67, 201, 120, 0.14) !important;
}

.admin-body .ad-table th:first-child,
.admin-body .ad-table td:first-child {
    width: 42px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.admin-body .publish-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px 14px !important;
    padding: 14px 16px 16px !important;
    overflow: visible !important;
}

.admin-body .publish-form .publish-form-types {
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 46px !important;
    padding: 8px 10px !important;
    border: 1px solid #e1e6ee !important;
    border-radius: 8px !important;
    background: #fff !important;
}

.admin-body .publish-form .publish-form-types > span {
    flex: 0 0 auto !important;
    margin: 0 8px 0 0 !important;
    color: #3d4a5f !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.admin-body .publish-form .publish-form-types > span::before {
    display: none !important;
}

.admin-body .publish-form .publish-form-types label {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 94px !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #d7dce4 0%, #bcc4cf 100%) !important;
    box-shadow: none !important;
    color: #fff !important;
    cursor: pointer !important;
    overflow: hidden !important;
}

.admin-body .publish-form .publish-form-types label strong {
    color: #fff !important;
    font-size: 13px !important;
    line-height: 30px !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
}

.admin-body .publish-form .publish-form-types label em {
    display: none !important;
}

.admin-body .publish-form .publish-form-types label input {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 0 !important;
    cursor: pointer !important;
}

.admin-body .publish-form .publish-form-types label::after {
    content: "" !important;
    display: none !important;
    width: 11px !important;
    height: 6px !important;
    margin-left: 8px !important;
    border-left: 2px solid #fff !important;
    border-bottom: 2px solid #fff !important;
    transform: rotate(-45deg) translateY(-1px) !important;
}

.admin-body .publish-form .publish-form-types label:has(input:checked) {
    background: linear-gradient(180deg, #9be9b4 0%, #55c982 100%) !important;
    box-shadow: 0 5px 12px rgba(85, 201, 130, 0.22) !important;
}

.admin-body .publish-form .publish-form-types label:has(input:checked)::after {
    display: inline-block !important;
}

.admin-body .publish-form .publish-form-types label:has(input:checked) input::after {
    border-color: #fff !important;
}

.admin-body .publish-form .publish-settings-row {
    grid-column: 1 / -1 !important;
    display: flex !important;
    align-items: end !important;
    gap: 26px !important;
    padding: 0 !important;
}

.admin-body .publish-form .publish-compact-field {
    display: flex !important;
    align-items: center !important;
    min-height: 36px !important;
    gap: 10px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #3d4a5f !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
}

.admin-body .publish-form .publish-compact-field input,
.admin-body .publish-form .publish-compact-field select {
    width: 190px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 9px !important;
    border-radius: 5px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

.admin-body .publish-form .publish-compact-field select[name="connected_mode"] {
    width: 220px !important;
}

.admin-body .publish-form .publish-compact-field input.locked-control,
.admin-body .publish-form .publish-compact-field select.locked-control {
    background: #f1f4f8 !important;
    color: #8b97a8 !important;
}

.admin-body .publish-form .publish-source-field {
    grid-column: 1 / -1 !important;
    display: grid !important;
    gap: 6px !important;
    color: #3d4a5f !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

.admin-body .publish-form .publish-source-field textarea {
    min-height: 250px !important;
    max-height: 360px !important;
    padding: 10px 12px !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
}

.admin-body .publish-form > button {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 5px !important;
    font-weight: 400 !important;
}

.admin-body .publish-form label,
.admin-body .publish-form input,
.admin-body .publish-form select,
.admin-body .publish-form textarea,
.admin-body .publish-form button {
    font-weight: 400 !important;
}

/* Settings page */
.admin-body .settings-form {
    display: grid !important;
    gap: 18px !important;
    padding: 20px !important;
}

.settings-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #dfe8f3;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 12px 26px rgba(40, 72, 116, 0.06);
}

.settings-subnav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 15px;
    border: 1px solid #d9e4f1;
    border-radius: 999px;
    background: #ffffff;
    color: #40516b;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(25, 49, 87, 0.05);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.settings-subnav a.active,
.settings-subnav a:hover {
    border-color: #82c7a6;
    background: linear-gradient(180deg, #eafaf2 0%, #dff5eb 100%);
    color: #0d7d55;
    box-shadow: 0 8px 18px rgba(34, 151, 97, 0.14);
    transform: translateY(-1px);
}

.settings-form-single {
    padding-top: 18px !important;
}

.settings-section {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e4ebf4;
    border-radius: 12px;
    background: #fbfdff;
}

.settings-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf2f7;
}

.settings-section-head h2 {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    color: #111827;
    font-size: 18px;
}

.settings-section-head p {
    margin: 0;
    color: #6d7c90;
    font-size: 13px;
}

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

.settings-grid label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-size: 13px;
    font-weight: 400 !important;
}

.settings-radio-field {
    display: grid;
    gap: 9px;
    color: #344054;
    font-size: 13px;
}

.inline-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
    min-height: 38px;
}

.inline-radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.inline-radio-group input[type="radio"] {
    width: auto;
    min-height: 0;
    margin: 0;
}

.settings-grid input,
.settings-grid select,
.settings-grid textarea,
.settings-ad-row input {
    min-height: 38px;
    border-radius: 7px;
    font-weight: 400 !important;
}

.settings-grid textarea {
    min-height: 154px;
    line-height: 1.55;
}

.settings-display-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dce7f4;
    border-radius: 10px;
    background: #f8fafc;
}

.settings-display-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f7;
}

.settings-display-head strong {
    color: #111827;
    font-size: 15px;
}

.settings-display-head small,
.settings-day-switch small,
.settings-day-switch em {
    color: #64748b;
    font-size: 12px;
    font-style: normal;
}

.settings-display-list {
    display: grid;
    gap: 8px;
}

.settings-day-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #ffffff;
    color: #344054;
    font-size: 13px;
}

.settings-day-switch.disabled {
    background: #f1f5f9;
    opacity: .9;
}

.settings-display-text {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.settings-display-text strong {
    color: #111827;
    font-size: 14px;
    font-weight: 500;
}

.settings-day-control {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

.settings-switch {
    position: relative;
    display: inline-flex !important;
    width: 46px;
    height: 24px;
    min-height: 0 !important;
    cursor: pointer;
}

.settings-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-switch i {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd5e1;
    box-shadow: inset 0 0 0 1px rgba(71, 85, 105, .14);
    transition: background .18s ease, box-shadow .18s ease;
}

.settings-switch i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .22);
    transition: transform .18s ease;
}

.settings-switch input:checked + i {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

.settings-switch input:checked + i::after {
    transform: translateX(22px);
}

.admin-body .settings-switch input {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 0 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    pointer-events: none !important;
}

.admin-body .settings-switch input::after {
    display: none !important;
    content: none !important;
}

.admin-body .settings-switch input:checked,
.admin-body .settings-switch input:focus {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.other-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 18px;
}

.other-settings-column {
    display: grid;
    align-content: start;
    gap: 18px;
}

.settings-card {
    display: grid;
    align-content: start;
    align-self: start;
    grid-auto-rows: max-content;
    gap: 16px;
    padding: 18px;
    border: 1px solid #dce7f4;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(35, 61, 98, .08);
}

.settings-card-wide {
    grid-column: 1 / -1;
}

.settings-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 13px;
    border-bottom: 1px solid #edf2f7;
}

.settings-card-head h2 {
    margin: 4px 0 0;
    color: #111827;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
}

.settings-card-head p {
    max-width: 340px;
    margin: 2px 0 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.55;
    text-align: right;
}

.settings-card-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2866b1;
    font-size: 12px;
    line-height: 20px;
}

.compact-grid {
    gap: 12px;
}

.settings-card .settings-grid input,
.settings-card .settings-grid select,
.settings-card .settings-grid textarea {
    border-color: #d7e2ef;
    background: #fbfdff;
}

.settings-card .settings-grid input:focus,
.settings-card .settings-grid select:focus,
.settings-card .settings-grid textarea:focus {
    border-color: #76a9e8;
    box-shadow: 0 0 0 3px rgba(55, 125, 220, .12);
}

.settings-choice-field {
    display: grid;
    gap: 8px;
    color: #344054;
    font-size: 13px;
}

.settings-choice-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.settings-choice-group label {
    position: relative;
    display: block;
    padding: 0;
    cursor: pointer;
}

.settings-choice-group input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-choice-group label > span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #d7e2ef;
    border-radius: 7px;
    background: #fbfdff;
    color: #40516b;
    transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.settings-choice-group input:checked + span {
    border-color: #2d7ff0;
    background: #edf5ff;
    color: #1556a8;
    box-shadow: inset 0 0 0 1px rgba(45, 127, 240, .16);
}

.settings-card-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

.settings-card-actions .primary-btn {
    min-width: 126px;
    min-height: 38px;
    border-radius: 7px;
}

@media (max-width: 980px) {
    .other-settings-grid,
    .settings-choice-group {
        grid-template-columns: 1fr;
    }

    .settings-card-head {
        display: grid;
    }

    .settings-card-head p {
        max-width: none;
        text-align: left;
    }
}

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

.settings-color-field {
    gap: 5px !important;
    min-width: 0;
}

.settings-color-field small {
    color: #667085;
    font-size: 12px;
    line-height: 16px;
}

.settings-color-label {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    max-width: 100%;
    overflow: hidden;
    font-size: 12px;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-color-control {
    display: grid;
    grid-template-columns: 22px minmax(68px, 76px);
    align-items: center;
    gap: 4px;
}

.settings-color-control input[type="color"] {
    width: 22px;
    min-height: 22px;
    height: 22px;
    padding: 1px;
    border-radius: 6px;
    cursor: pointer;
}

.settings-color-control input[type="text"],
.settings-color-control input:not([type]) {
    min-height: 24px;
    height: 24px;
    padding: 3px 5px;
    font-family: Consolas, "Microsoft YaHei", Arial, sans-serif;
    font-size: 11px;
}

.basic-settings-grid {
    align-items: start;
}

.settings-help-spacer {
    min-height: 18px;
}

.settings-ad-grid {
    display: grid;
    gap: 10px;
}

.settings-ad-row {
    display: grid;
    grid-template-columns: 72px minmax(220px, 1fr) minmax(220px, 1fr);
    gap: 10px;
    align-items: center;
}

.settings-ad-row span {
    color: #344054;
    font-size: 13px;
}

.settings-savebar {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    padding: 14px 0 0;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff 36%);
}

.settings-savebar .primary-btn {
    min-width: 160px;
}

.member-filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1.2fr) minmax(160px, 0.7fr) 130px auto;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border: 1px solid #e4ebf4;
    border-radius: 12px;
    background: #fbfdff;
}

.member-filter-bar label {
    display: grid;
    gap: 6px;
    color: #4c5a70;
    font-size: 13px;
    font-weight: 400 !important;
}

.member-filter-bar input,
.member-filter-bar select {
    min-height: 36px;
    border-radius: 7px;
    font-weight: 400 !important;
}

.member-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.member-summary-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f5fb;
    color: #4b5b73;
    font-size: 13px;
}

.member-table {
    min-width: 1080px;
}

.member-name-cell {
    color: #172033;
    font-weight: 700;
}

.money-cell {
    color: #08745f;
    font-family: Consolas, "Microsoft YaHei", Arial, sans-serif;
}

.member-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #edf2f7;
    color: #40516b;
    font-size: 12px;
}

.member-state.active {
    background: #e6f8ee;
    color: #08745f;
}

.member-state.disabled {
    background: #fff1f0;
    color: #b42318;
}

.member-state.pending {
    background: #fff7e6;
    color: #9a5b00;
}

.member-row-actions {
    white-space: nowrap;
}

.member-edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
    gap: 18px;
    align-items: start;
}

.member-profile-strip {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 0 0 16px;
    padding: 16px 18px;
    border: 1px solid #dfe7f1;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 14px 34px rgba(24, 39, 75, 0.06);
}

.member-avatar {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #dff7ec 0%, #61ca91 100%);
    color: #0d5f3b;
    font-size: 22px;
    font-weight: 800;
}

.member-profile-main {
    min-width: 0;
}

.member-profile-main strong {
    display: block;
    color: #111827;
    font-size: 20px;
    line-height: 26px;
}

.member-profile-main span {
    display: block;
    margin-top: 3px;
    color: #6d7c90;
    font-size: 13px;
}

.member-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.member-profile-meta > span:first-child {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef4fb;
    color: #40516b;
    font-size: 12px;
}

.member-edit-card,
.member-wallet-card {
    display: grid;
    gap: 16px;
    padding: 18px !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 34px rgba(24, 39, 75, 0.07) !important;
}

.member-edit-card .settings-section-head,
.member-wallet-card .settings-section-head {
    align-items: center;
    padding-bottom: 14px;
}

.member-edit-card .settings-grid {
    gap: 16px;
}

.member-edit-card .settings-grid label,
.member-wallet-form label {
    color: #526176;
}

.member-edit-card input,
.member-edit-card select,
.member-wallet-form input,
.member-wallet-form select {
    min-height: 42px !important;
    border-color: #dbe5f0 !important;
    background: #fff !important;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.member-edit-card input:focus,
.member-edit-card select:focus,
.member-wallet-form input:focus,
.member-wallet-form select:focus {
    border-color: #61b987 !important;
    box-shadow: 0 0 0 3px rgba(97, 185, 135, 0.14) !important;
}

.member-wallet-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.member-wallet-stats div {
    min-height: 86px;
    padding: 14px;
    border: 1px solid #e0e9f4;
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
}

.member-wallet-stats span {
    display: block;
    color: #6d7c90;
    font-size: 12px;
}

.member-wallet-stats strong {
    display: block;
    margin-top: 8px;
    color: #172033;
    font-size: 22px;
    line-height: 28px;
}

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

.member-wallet-form label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-size: 13px;
    font-weight: 400 !important;
}

.member-wallet-form input,
.member-wallet-form select {
    min-height: 38px;
    font-weight: 400 !important;
}

.member-wallet-form button {
    width: 160px;
}

.member-form-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 2px;
}

.member-form-actions .primary-btn {
    width: 150px;
    min-height: 40px;
    border-color: #24a56b !important;
    background: linear-gradient(180deg, #35c982 0%, #159a61 100%) !important;
    box-shadow: 0 10px 20px rgba(21, 154, 97, 0.18);
}

.member-wallet-card .member-form-actions .primary-btn {
    width: 150px;
}

.staff-layout-grid {
    display: grid;
    grid-template-columns: minmax(420px, 0.82fr) minmax(0, 1.18fr);
    gap: 18px;
    align-items: start;
}

.staff-create-card,
.staff-list-card {
    display: grid;
    gap: 16px;
    padding: 18px !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 34px rgba(24, 39, 75, 0.07) !important;
}

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

.staff-permission-picker {
    display: grid;
    gap: 10px;
}

.staff-permission-picker > span {
    color: #526176;
    font-size: 13px;
}

.staff-permission-picker > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.staff-permission-picker label {
    position: relative;
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #dbe5f0;
    border-radius: 12px;
    background: #f8fbff;
    color: #445066;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}

.staff-permission-picker label input {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
}

.staff-permission-picker label strong {
    font-size: 13px;
    font-weight: 400;
}

.staff-permission-picker label:has(input:checked) {
    border-color: #67c792;
    background: linear-gradient(180deg, #effcf5 0%, #dff7ec 100%);
    color: #08745f;
    box-shadow: 0 8px 18px rgba(21, 154, 97, 0.1);
}

.staff-table {
    min-width: 780px;
}

.staff-role-badge,
.staff-permission-badge,
.staff-permission-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
}

.staff-role-badge {
    background: #eef4fb;
    color: #315ca8;
}

.staff-role-badge.role-super_admin {
    background: #fff1f0;
    color: #b42318;
}

.staff-role-badge.role-admin {
    background: #fff7e6;
    color: #9a5b00;
}

.staff-role-badge.role-staff {
    background: #e6f8ee;
    color: #08745f;
}

.staff-permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.staff-permission-badge {
    background: #f2f4f7;
    color: #40516b;
}

.staff-permission-empty {
    background: #e6f8ee;
    color: #08745f;
}

.log-panel {
    display: grid;
    gap: 14px;
    padding: 18px !important;
    border-radius: 16px !important;
}

.log-table {
    min-width: 980px;
    table-layout: fixed;
}

.log-table .log-col-time {
    width: 190px;
}

.log-table .log-col-user {
    width: 150px;
}

.log-table .log-col-action {
    width: 170px;
}

.log-table .log-col-message {
    width: auto;
}

.log-table th:nth-child(1),
.log-table td:nth-child(1) {
    width: 190px;
}

.log-table th:nth-child(2),
.log-table td:nth-child(2) {
    width: 150px;
}

.log-table th:nth-child(3),
.log-table td:nth-child(3) {
    width: 170px;
}

.log-table th,
.log-table td {
    height: 42px;
    max-height: 42px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.log-table td:nth-child(4) {
    max-width: 0;
}

.log-action-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eef4fb;
    color: #315ca8;
    font-size: 12px;
    white-space: nowrap;
}

.log-action-badge.user {
    background: #e6f8ee;
    color: #08745f;
}

.log-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #6d7c90;
    font-size: 13px;
}

.log-pagination nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.log-pagination a {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #fff;
    color: #40516b;
    text-decoration: none;
}

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

/* Ad manager normal text weight */
.ad-manager-panel .ad-table,
.ad-manager-panel .ad-table th,
.ad-manager-panel .ad-table td,
.ad-manager-panel .ad-server-name,
.ad-manager-panel .ad-id-cell,
.ad-manager-panel .ad-view-link,
.ad-manager-panel .ad-type-badge,
.ad-manager-panel .ad-state,
.ad-manager-panel .ad-toggle,
.ad-manager-panel .ad-edit-btn,
.ad-manager-panel .ad-time-btn,
.ad-manager-panel .ad-warn-btn,
.ad-manager-panel .ad-delete-btn,
.ad-manager-panel .ad-danger-btn,
.ad-manager-panel .ad-search-btn,
.ad-manager-panel .member-name-cell {
    font-weight: 400 !important;
}

/* Publish edit page */
.publish-edit-summary {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 0.9fr;
    gap: 12px;
    margin: 0 0 16px;
}

.publish-edit-summary > div {
    min-height: 78px;
    padding: 14px;
    border: 1px solid #dfe7f1;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 10px 26px rgba(24, 39, 75, 0.05);
}

.publish-edit-summary span {
    display: block;
    color: #6d7c90;
    font-size: 12px;
}

.publish-edit-summary strong {
    display: block;
    margin-top: 8px;
    color: #172033;
    font-size: 17px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.publish-edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(410px, 0.9fr);
    gap: 18px;
    align-items: stretch;
}

.publish-edit-card {
    display: grid;
    gap: 16px;
    padding: 18px !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 34px rgba(24, 39, 75, 0.07) !important;
}

.publish-edit-fields label,
.publish-edit-side-grid label {
    color: #526176;
    font-weight: 400 !important;
}

.publish-edit-fields input,
.publish-edit-fields select,
.publish-edit-fields textarea,
.publish-edit-side-grid input {
    min-height: 42px !important;
    border-color: #dbe5f0 !important;
    border-radius: 9px !important;
    background: #fff !important;
    font-weight: 400 !important;
}

.publish-edit-fields textarea {
    min-height: 88px;
    line-height: 1.55;
}

.publish-edit-fields input:focus,
.publish-edit-fields select:focus,
.publish-edit-fields textarea:focus,
.publish-edit-side-grid input:focus {
    border-color: #61b987 !important;
    box-shadow: 0 0 0 3px rgba(97, 185, 135, 0.14) !important;
}

.publish-edit-type-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.publish-edit-type-picker label {
    position: relative;
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid #dbe5f0;
    border-radius: 12px;
    background: #f8fbff;
    color: #445066;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease;
}

.publish-edit-type-picker input {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
}

.publish-edit-type-picker label:has(input:checked) {
    border-color: #67c792;
    background: linear-gradient(180deg, #effcf5 0%, #dff7ec 100%);
    color: #08745f;
    box-shadow: 0 8px 18px rgba(21, 154, 97, 0.1);
}

.publish-edit-type-picker label.type-disabled {
    cursor: not-allowed;
    border-color: #d4d9e2;
    background: #eef1f5;
    color: #8a94a4;
    box-shadow: none;
}

.publish-edit-side-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.publish-edit-rule-box {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid #dfeee8;
    border-radius: 12px;
    background: #f4fbf7;
    color: #52705f;
    font-size: 12px;
}

.publish-edit-rule-box strong {
    color: #0d5f3b;
    font-weight: 400;
}

.publish-edit-save {
    width: 160px;
    min-height: 40px;
    border-color: #24a56b !important;
    background: linear-gradient(180deg, #35c982 0%, #159a61 100%) !important;
    box-shadow: 0 10px 20px rgba(21, 154, 97, 0.18);
}

@media (max-width: 1100px) {
    .publish-edit-summary,
    .publish-edit-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .settings-grid,
    .color-grid,
    .settings-ad-row,
    .member-filter-bar,
    .member-edit-grid,
    .member-wallet-form,
    .member-wallet-stats {
        grid-template-columns: 1fr;
    }

    .staff-layout-grid,
    .staff-permission-picker > div {
        grid-template-columns: 1fr;
    }

    .member-profile-strip {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .member-profile-meta {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

/* Smart publish page redesign */
.publish-create-summary {
    margin-bottom: 16px;
}

.publish-create-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1.06fr) minmax(390px, 0.94fr) !important;
    gap: 18px !important;
    align-items: stretch !important;
}

.publish-create-layout .publish-edit-card {
    min-width: 0;
}

.publish-create-main-card,
.publish-create-preview-card {
    display: grid !important;
    gap: 16px !important;
    padding: 18px !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 34px rgba(24, 39, 75, 0.07) !important;
}

.publish-create-type-block {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px !important;
    border: 1px solid #dfe7f1 !important;
    border-radius: 12px !important;
    background: #fbfdff !important;
}

.publish-create-label {
    color: #526176 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

.admin-body .publish-create-layout .publish-form-types {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.admin-body .publish-create-layout .publish-form-types label {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 108px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 16px !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 999px !important;
    background: #f6f9fc !important;
    color: #445066 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    overflow: hidden !important;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease !important;
}

.admin-body .publish-create-layout .publish-form-types label strong {
    color: inherit !important;
    font-size: 13px !important;
    line-height: 34px !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
}

.admin-body .publish-create-layout .publish-form-types label small {
    margin-left: 6px;
    color: inherit;
    font-size: 12px;
    line-height: 34px;
    opacity: .78;
    white-space: nowrap;
}

.admin-body .publish-create-layout .publish-form-types label input {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 0 !important;
    cursor: pointer !important;
}

.admin-body .publish-create-layout .publish-form-types label::after {
    content: "" !important;
    display: none !important;
    width: 10px !important;
    height: 5px !important;
    margin-left: 8px !important;
    border-left: 2px solid #08745f !important;
    border-bottom: 2px solid #08745f !important;
    transform: rotate(-45deg) translateY(-1px) !important;
}

.admin-body .publish-create-layout .publish-form-types label:has(input:checked) {
    border-color: #67c792 !important;
    background: linear-gradient(180deg, #effcf5 0%, #dff7ec 100%) !important;
    color: #08745f !important;
    box-shadow: 0 8px 18px rgba(21, 154, 97, 0.1) !important;
}

.admin-body .publish-create-layout .publish-form-types label:has(input:checked)::after {
    display: inline-block !important;
}

.publish-create-controls {
    display: grid !important;
    grid-template-columns: minmax(190px, 230px) 150px 150px !important;
    gap: 12px !important;
    align-items: end !important;
}

.admin-body .publish-create-layout .publish-compact-field,
.admin-body .publish-create-layout .publish-source-field {
    display: grid !important;
    gap: 7px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #526176 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

.admin-body .publish-create-layout .publish-compact-field input,
.admin-body .publish-create-layout .publish-compact-field select {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 11px !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #172033 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

.admin-body .publish-create-layout .publish-compact-field input.locked-control,
.admin-body .publish-create-layout .publish-compact-field select.locked-control {
    background: #f1f4f8 !important;
    color: #8b97a8 !important;
    cursor: not-allowed !important;
}

.admin-body .publish-create-layout .publish-source-field textarea {
    min-height: 210px !important;
    height: 210px !important;
    max-height: none !important;
    padding: 12px 14px !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #172033 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
}

.publish-price-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid #dfeee8;
    border-radius: 12px;
    background: #f4fbf7;
    color: #436452;
}

.publish-form[data-admin="1"] .publish-price-panel,
.publish-form[data-admin="1"] .publish-form-types label small {
    display: none !important;
}

.publish-price-panel span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
}

.publish-price-panel strong {
    margin: 0 3px;
    color: #0f766e;
    font-weight: 400;
}

.publish-price-panel em {
    grid-column: 1 / -1;
    color: #7a8798;
    font-size: 12px;
    font-style: normal;
}

.admin-body .publish-create-layout input:focus,
.admin-body .publish-create-layout select:focus,
.admin-body .publish-create-layout textarea:focus {
    border-color: #61b987 !important;
    box-shadow: 0 0 0 3px rgba(97, 185, 135, 0.14) !important;
}

.publish-create-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.publish-create-actions button {
    min-height: 42px !important;
    border-radius: 9px !important;
    font-weight: 400 !important;
}

.publish-create-save {
    border-color: #24a56b !important;
    background: linear-gradient(180deg, #35c982 0%, #159a61 100%) !important;
    box-shadow: 0 10px 20px rgba(21, 154, 97, 0.18);
}

.publish-create-preview {
    min-height: 475px !important;
    height: 475px !important;
    max-height: 475px !important;
    margin: 0 !important;
    padding: 14px !important;
    border: 1px solid #dfe7f1 !important;
    border-radius: 12px !important;
    background: #101828 !important;
    color: #d5f6ff !important;
    overflow: auto !important;
}

.publish-create-preview .preview-table {
    width: max-content;
    min-width: 100%;
    color: #172033;
}

@media (max-width: 1180px) {
    .publish-create-layout {
        grid-template-columns: 1fr !important;
    }
}

.crawler-page-head {
    align-items: flex-start;
}

.crawler-card-grid {
    display: grid;
    gap: 18px;
}

.crawler-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.crawler-card-head,
.crawler-actions,
.crawler-target,
.crawler-last {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.crawler-card-head h2 {
    margin: 4px 0 0;
    color: #122033;
    font-size: 24px;
    line-height: 1.2;
}

.crawler-kicker {
    color: #64748b;
    font-size: 13px;
}

.crawler-status,
.crawler-run-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
    color: #475569;
    background: #eef2f7;
}

.crawler-status.active,
.crawler-run-status.success {
    color: #047857;
    background: #dcfce7;
}

.crawler-run-status.failed {
    color: #b42318;
    background: #fee4e2;
}

.crawler-target {
    justify-content: flex-start;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.crawler-target span,
.crawler-cron label span {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 13px;
}

.crawler-target a {
    color: #1d4ed8;
    word-break: break-all;
}

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

.crawler-metrics div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid #e4eaf2;
    border-radius: 8px;
    background: #fbfdff;
}

.crawler-metrics strong {
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
}

.crawler-metrics span,
.crawler-last span,
.crawler-last p,
.crawler-cron p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.crawler-last {
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.crawler-last p {
    flex-basis: 100%;
    color: #334155;
}

.crawler-cron {
    display: grid;
    gap: 8px;
}

.crawler-cron label {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.crawler-cron input {
    width: 100%;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}

.crawler-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.crawler-actions form,
.crawler-table form {
    margin: 0;
}

.crawler-section {
    margin-top: 0;
}

.crawler-table th,
.crawler-table td {
    white-space: nowrap;
}

.crawler-table .crawler-message {
    min-width: 240px;
    white-space: normal;
}

.primary-btn.compact {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 13px;
}

@media (max-width: 860px) {
    .crawler-card-head,
    .crawler-target,
    .crawler-actions {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .crawler-cron label {
        grid-template-columns: 1fr;
    }
}

.nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-style: normal;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(239, 68, 68, .28);
}

.member-title-line {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.member-title-line h1 {
    margin: 0;
}

.member-level-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #dffbea, #baf1d3);
    color: #047857;
    font-size: 13px;
    font-weight: 400;
    border: 1px solid #9ee6bf;
}

.member-benefit-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    max-width: 100%;
    margin-top: 8px;
    font-size: 12px;
}

.member-benefit-line strong {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff1f2;
    color: #e00000;
    font-weight: 400;
}

.member-benefit-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-weight: 400;
    white-space: nowrap;
}

.member-benefit-tag.tag-0 {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.member-benefit-tag.tag-1 {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.member-benefit-tag.tag-2 {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.member-benefit-tag.tag-3 {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

.member-benefit-tag.tag-4 {
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
}

.member-benefit-tag.tag-5 {
    background: #f8fafc;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.level-settings-panel .level-basic-grid {
    grid-template-columns: minmax(160px, 220px) minmax(220px, 320px);
}

.level-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.level-add-btn,
.level-delete-btn {
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 400;
}

.level-add-btn {
    min-height: 36px !important;
    padding: 0 14px !important;
    white-space: nowrap;
}

.level-edit-row {
    grid-template-columns: 92px minmax(150px, 1fr) minmax(120px, .7fr) minmax(110px, .55fr) 72px !important;
}

.level-delete-btn {
    min-height: 38px;
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.level-delete-btn:hover {
    background: #ffe4e6;
}

.member-message-layout {
    display: grid;
    grid-template-columns: minmax(420px, .85fr) minmax(0, 1.15fr);
    gap: 18px;
    align-items: start;
}

.member-message-form,
.member-message-history,
.user-message-panel {
    border-radius: 18px !important;
    border: 1px solid #dfe7f1 !important;
    box-shadow: 0 16px 42px rgba(24, 39, 75, .08) !important;
}

.message-history-list,
.user-message-list {
    display: grid;
    gap: 12px;
}

.message-history-item,
.user-message-item {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e4ebf4;
    border-radius: 14px;
    background: #fff;
}

.message-history-item strong,
.user-message-item strong {
    color: #10243f;
    font-size: 15px;
    font-weight: 400;
}

.message-history-item span,
.user-message-main span {
    color: #7a8798;
    font-size: 12px;
}

.message-history-item p,
.user-message-item p {
    margin: 0;
    color: #344054;
    line-height: 1.6;
}

.user-message-main {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.user-message-main > div {
    display: grid;
    gap: 4px;
}

.user-message-main em {
    min-width: 46px;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-style: normal;
    line-height: 24px;
    text-align: center;
}

.user-message-item.unread {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fff, #fff8f8);
}

.user-message-item.unread .user-message-main em {
    background: #ef4444;
    color: #fff;
}

.user-message-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.user-message-actions form {
    margin: 0;
}

.user-message-actions button {
    min-height: 32px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
}

.user-dashboard-no-notice {
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
}

.user-dashboard-no-notice .user-log-card {
    grid-row: auto;
}

@media (max-width: 1180px) {
    .member-message-layout,
    .user-dashboard-no-notice,
    .level-settings-panel .level-basic-grid {
        grid-template-columns: 1fr !important;
    }

    .level-edit-row {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 760px) {
    .publish-create-type-block,
    .publish-create-controls,
    .publish-create-actions {
        grid-template-columns: 1fr !important;
    }
}

/* Admin UI consistency pass */
.admin-body .staff-create-card,
.admin-body .staff-list-card,
.admin-body .ad-manager-panel,
.admin-body .publish-edit-card {
    border: 1px solid #dfe7f1 !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    box-shadow: 0 16px 42px rgba(24, 39, 75, 0.08) !important;
}

.admin-body .settings-section-head {
    align-items: center;
}

.admin-body .settings-section-head h2 {
    color: #0f223d !important;
    font-size: 20px !important;
    font-weight: 400 !important;
}

.admin-body .settings-section-head p {
    color: #667892 !important;
    font-weight: 400 !important;
}

.admin-body .staff-layout-grid {
    grid-template-columns: minmax(410px, 0.82fr) minmax(0, 1.18fr) !important;
    align-items: stretch !important;
}

.admin-body .recharge-card-layout {
    grid-template-columns: minmax(360px, 0.68fr) minmax(0, 1.32fr) !important;
    align-items: start !important;
}

.admin-body .recharge-card-create {
    align-self: start !important;
}

.admin-body .staff-create-card,
.admin-body .staff-list-card {
    padding: 20px !important;
}

.admin-body .staff-fields label,
.admin-body .staff-permission-picker > span {
    color: #526176 !important;
    font-weight: 400 !important;
}

.admin-body .staff-fields input {
    min-height: 42px !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    font-weight: 400 !important;
}

.admin-body .staff-permission-picker {
    padding: 12px !important;
    border: 1px solid #e4ebf4 !important;
    border-radius: 14px !important;
    background: #f8fbff !important;
}

.admin-body .staff-permission-picker label {
    min-height: 40px !important;
    border-radius: 999px !important;
    background: #fff !important;
}

.admin-body .staff-permission-picker label:has(input:checked) {
    border-color: #67c792 !important;
    background: linear-gradient(180deg, #effcf5 0%, #dff7ec 100%) !important;
    color: #08745f !important;
}

.admin-body .staff-table th,
.admin-body .staff-table td {
    height: 42px !important;
    padding: 8px 10px !important;
    font-weight: 400 !important;
}

.admin-body .staff-table th {
    background: #f3f6fa !important;
    color: #344054 !important;
}

.admin-body .staff-table tbody tr:hover td {
    background: #f2fbf9 !important;
}

.admin-body .ad-manager-panel {
    padding: 14px !important;
    overflow: hidden !important;
}

.admin-body .ad-filter-bar {
    gap: 10px !important;
    padding: 12px !important;
    border-radius: 14px !important;
    background: #f8fbff !important;
}

.admin-body .ad-filter-bar label {
    border: 1px solid #dbe5f0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.admin-body .ad-filter-bar label span {
    background: #eef4fb !important;
    color: #40516b !important;
    font-weight: 400 !important;
}

.admin-body .ad-filter-bar input,
.admin-body .ad-filter-bar select {
    font-weight: 400 !important;
}

.admin-body .ad-list-toolbar {
    margin-top: 12px !important;
    padding: 12px !important;
    border-radius: 14px 14px 0 0 !important;
    background: #fbfdff !important;
}

.admin-body .ad-list-toolbar span {
    color: #667892 !important;
    font-weight: 400 !important;
}

.admin-body .ad-search-btn,
.admin-body .ad-danger-btn,
.admin-body .ad-edit-btn,
.admin-body .ad-time-btn,
.admin-body .ad-warn-btn,
.admin-body .ad-delete-btn {
    border-radius: 8px !important;
    font-weight: 400 !important;
    box-shadow: none !important;
}

.admin-body .ad-edit-btn {
    background: #109989 !important;
}

.admin-body .ad-time-btn {
    background: #3378d8 !important;
}

.admin-body .ad-time-btn.has-schedule {
    background: #dc2626 !important;
    color: #fff !important;
}

.admin-body .ad-time-btn.is-disabled,
.admin-body .ad-time-btn:disabled {
    background: #cbd5e1 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.admin-body .ad-warn-btn {
    background: #f59e0b !important;
}

.admin-body .ad-delete-btn {
    background: #ef5b3d !important;
}

.admin-body .ad-table-wrap {
    border-radius: 0 0 14px 14px !important;
    background: #fff !important;
}

.admin-body .ad-manager-table th,
.admin-body .ad-manager-table td {
    font-weight: 400 !important;
}

.admin-body .ad-manager-table th {
    background: #f3f6fa !important;
}

.admin-body .ad-manager-table td {
    background: #fff !important;
}

.admin-body .ad-manager-table tbody tr:nth-child(even) td {
    background: #fbfdff !important;
}

.admin-body .ad-pagination {
    margin-top: 12px !important;
}

.admin-body .ad-pagination a {
    border-radius: 8px !important;
    font-weight: 400 !important;
}

.admin-body .ad-time-dialog {
    border-radius: 18px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

.admin-body .ad-time-tabs label {
    border-radius: 12px !important;
    font-weight: 400 !important;
}

.admin-body .ad-time-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.admin-body .ad-time-tabs label {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    gap: 8px !important;
    border: 1px solid #dbe5f0 !important;
    background: #f8fbff !important;
    color: #344054 !important;
    overflow: hidden !important;
}

.admin-body .ad-time-tabs label input {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
}

.admin-body .ad-time-tabs label::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid #c9d4e2;
    border-radius: 50%;
    background: #fff;
}

.admin-body .ad-time-tabs label:has(input:checked) {
    border-color: #67c792 !important;
    background: linear-gradient(180deg, #effcf5 0%, #dff7ec 100%) !important;
    color: #08745f !important;
    box-shadow: 0 8px 18px rgba(21, 154, 97, 0.1) !important;
}

.admin-body .ad-time-tabs label:has(input:checked)::before {
    border-color: #159a61;
    box-shadow: inset 0 0 0 4px #fff;
    background: #159a61;
}

.admin-body .ad-time-current {
    border: 1px solid #e4ebf4 !important;
    background: #f8fbff !important;
}

.admin-body .ad-time-now select,
.admin-body .ad-time-schedule textarea {
    border-radius: 10px !important;
    font-weight: 400 !important;
}

.admin-body .publish-edit-summary > div {
    border-radius: 18px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

.admin-body .publish-edit-type-picker label {
    min-height: 40px !important;
    border-radius: 999px !important;
    background: #fff !important;
    font-weight: 400 !important;
}

.admin-body .publish-edit-type-picker label:has(input:checked) {
    background: linear-gradient(180deg, #effcf5 0%, #dff7ec 100%) !important;
    color: #08745f !important;
}

.admin-body .publish-edit-rule-box {
    border-radius: 14px !important;
}

/* Member console */
.user-console-body .admin-brand span {
    background: linear-gradient(180deg, #44d18d, #159a61);
}

.user-console-body .admin-brand strong {
    display: block;
    max-width: 9em;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.user-console-card {
    border: 1px solid #dfe7f1 !important;
    border-radius: 18px !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
    box-shadow: 0 16px 42px rgba(24, 39, 75, 0.08) !important;
}

.user-summary-cards > div {
    border-radius: 18px !important;
}

.user-summary-compact {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.user-summary-compact > div {
    min-height: 58px !important;
    padding: 10px 12px !important;
}

.user-summary-compact strong {
    margin-top: 4px !important;
    font-size: 18px !important;
}

.level-edit-list,
.package-edit-list {
    display: grid;
    gap: 10px;
}

.level-edit-row {
    display: grid;
    grid-template-columns: 96px minmax(180px, 1fr) minmax(140px, 0.7fr) minmax(120px, 0.6fr);
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid #e3ebf5;
    border-radius: 12px;
    background: #fbfdff;
}

.package-edit-row {
    display: grid;
    grid-template-columns: 96px minmax(180px, 1fr) minmax(120px, 0.6fr) minmax(120px, 0.6fr) minmax(120px, 0.6fr);
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid #e3ebf5;
    border-radius: 12px;
    background: #fbfdff;
}

.level-edit-row label,
.package-edit-row label {
    display: grid;
    gap: 6px;
    color: #526176;
    font-size: 13px;
}

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

.package-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid #e1eaf4;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f9fcff);
}

.package-card h2 {
    margin: 0;
    color: #10243f;
    font-size: 20px;
}

.package-card strong {
    color: #0b8f61;
    font-size: 24px;
}

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

.member-quick-grid a {
    min-height: 40px;
}

.mini-dashboard-btn {
    min-height: 32px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
}

.dashboard-user-table-wrap {
    max-height: 430px !important;
}

.dashboard-user-table {
    min-width: 840px !important;
}

.dashboard-user-table .user-col-server {
    width: 210px;
}

.dashboard-user-table .user-col-time {
    width: 160px;
}

.dashboard-user-table .user-col-home {
    width: 76px;
}

.dashboard-user-table .user-col-status {
    width: 88px;
}

.dashboard-user-table .user-col-actions {
    width: 82px;
}

.dashboard-time-cell,
.dashboard-home-cell {
    text-align: center !important;
}

.dashboard-user-table th:nth-child(3),
.dashboard-user-table th:nth-child(4),
.dashboard-user-table td:nth-child(3),
.dashboard-user-table td:nth-child(4) {
    text-align: center !important;
}

.dashboard-user-table .ad-view-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    width: auto !important;
    text-align: center !important;
    margin: 0 auto !important;
}

.dashboard-user-table th,
.dashboard-user-table td {
    vertical-align: middle !important;
}

.dashboard-user-table .ad-row-actions {
    justify-content: center !important;
}

.user-summary-cards small {
    display: block;
    margin-top: 4px;
    color: #7a8798;
    font-size: 12px;
    font-weight: 400;
}

.user-price-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 16px;
}

.user-price-strip > div {
    min-height: 68px;
    padding: 12px 14px;
    border: 1px solid #dfe7f1;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 10px 26px rgba(24, 39, 75, 0.05);
}

.user-price-strip span {
    display: block;
    color: #6d7c90;
    font-size: 12px;
}

.user-price-strip strong {
    display: block;
    margin-top: 7px;
    color: #0f766e;
    font-size: 17px;
    font-weight: 400;
}

.user-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
    gap: 18px;
    align-items: start;
}

.user-publish-card,
.user-log-card {
    display: grid;
    gap: 16px;
    padding: 18px !important;
}

.user-publish-card,
.user-notice-card {
    grid-column: 1;
}

.user-log-card {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.user-table-wrap {
    border: 1px solid #e3e9f2 !important;
    border-radius: 14px !important;
    max-height: calc(100vh - 360px) !important;
    overflow: auto !important;
}

.user-publish-table {
    min-width: 980px;
    table-layout: fixed;
}

.user-publish-table .user-col-id {
    width: 56px;
}

.user-publish-table .user-col-server {
    width: 190px;
}

.user-publish-table .user-col-time {
    width: 150px;
}

.user-publish-table .user-col-line {
    width: 130px;
}

.user-publish-table .user-col-home {
    width: 74px;
}

.user-publish-table .user-col-status {
    width: 92px;
}

.user-publish-table .user-col-fee {
    width: 78px;
}

.user-publish-table .user-col-actions {
    width: 230px;
}

.user-publish-table th,
.user-publish-table td {
    height: 42px !important;
    padding: 8px 10px !important;
    font-weight: 400 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-publish-table th {
    background: #f3f6fa !important;
    color: #344054 !important;
    text-align: center;
}

.user-publish-table tbody tr:nth-child(even) td {
    background: #fbfdff !important;
}

.user-publish-table tbody tr:hover td {
    background: #f2fbf9 !important;
}

.user-publish-table td:nth-child(1),
.user-publish-table td:nth-child(6),
.user-publish-table td:nth-child(7),
.user-publish-table td:nth-child(8),
.user-publish-table td:nth-child(9) {
    text-align: center;
}

.user-publish-table .ad-row-actions {
    gap: 5px;
}

.user-publish-table .ad-time-btn,
.user-publish-table .ad-edit-btn,
.user-publish-table .ad-warn-btn {
    min-height: 28px !important;
    padding: 0 9px !important;
    font-size: 12px !important;
}

.ad-auto-time-note {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #fff7e6;
    color: #b45309;
    font-size: 12px;
}

.user-ad-manager-panel .ad-list-toolbar {
    display: none !important;
}

.user-ad-filter-bar {
    display: grid !important;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(130px, .7fr) 105px 82px;
    gap: 10px !important;
    margin-bottom: 12px;
}

.user-ad-list-table {
    min-width: 1260px;
    table-layout: fixed;
}

.user-ad-list-table .uad-col-id {
    width: 52px;
}

.user-ad-list-table .uad-col-server {
    width: 142px;
}

.user-ad-list-table .uad-col-date {
    width: 120px;
}

.user-ad-list-table .uad-col-hour,
.user-ad-list-table .uad-col-minute,
.user-ad-list-table .uad-col-home {
    width: 68px;
}

.user-ad-list-table .uad-col-type {
    width: 80px;
}

.user-ad-list-table .uad-col-switch {
    width: 78px;
}

.user-ad-list-table .uad-col-status {
    width: 92px;
}

.user-ad-list-table .uad-col-fee {
    width: 82px;
}

.user-ad-list-table .uad-col-actions {
    width: 138px;
}

.user-ad-list-table th,
.user-ad-list-table td {
    padding: 7px 8px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-ad-list-table .ad-server-name {
    max-width: none;
    text-align: left;
}

.user-ad-list-table .ad-toggle {
    width: 54px;
    min-width: 54px;
    justify-content: center;
}

.ad-toggle.readonly {
    cursor: not-allowed;
    opacity: .92;
}

.ad-toggle.readonly:not(.on) {
    background: #dbe3ee !important;
    color: #59677a !important;
}

.user-ad-list-table .user-time-btn.has-schedule {
    background: #7c3aed !important;
}

.user-publish-table .user-time-btn.has-schedule {
    background: #7c3aed !important;
}

.user-ad-list-table .user-time-btn.is-disabled,
.user-ad-list-table .user-time-btn:disabled,
.user-publish-table .user-time-btn.is-disabled,
.user-publish-table .user-time-btn:disabled {
    background: #cbd5e1 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.user-ad-list-table .ad-row-actions {
    gap: 5px;
    justify-content: center;
}

.user-ad-list-table .ad-edit-btn,
.user-ad-list-table .ad-time-btn {
    min-height: 28px !important;
    padding: 0 8px !important;
    font-size: 12px !important;
}

.user-log-list {
    display: grid;
    gap: 10px;
    max-height: calc(100vh - 360px);
    overflow: auto;
}

.user-log-item {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid #e5edf5;
    border-radius: 12px;
    background: #fff;
}

.user-log-item span {
    color: #7a8798;
    font-size: 12px;
}

.user-log-item strong {
    color: #0f766e;
    font-size: 13px;
    font-weight: 400;
}

.user-log-item p {
    margin: 0;
    color: #344054;
    font-size: 13px;
    line-height: 1.45;
}

.user-log-empty {
    padding: 18px;
    border: 1px dashed #d8e2ee;
    border-radius: 12px;
    color: #7a8798;
    text-align: center;
}

.amount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 400;
}

.amount-badge.increase {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.amount-badge.decrease {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.amount-badge.freeze {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.amount-badge.release {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.amount-record-table {
    min-width: 1040px !important;
    table-layout: fixed !important;
}

.amount-record-table .amount-col-time {
    width: 178px;
}

.amount-record-table .amount-col-type {
    width: 120px;
}

.amount-record-table .amount-col-money,
.amount-record-table .amount-col-balance {
    width: 130px;
}

.amount-record-table th,
.amount-record-table td {
    height: 42px;
    padding: 8px 12px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

.amount-record-table td:first-child,
.amount-record-table th:first-child {
    width: 178px !important;
    text-align: center !important;
}

.amount-record-table th:last-child,
.amount-record-table td:last-child {
    text-align: left !important;
}

.amount-record-table td:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.amount-record-table td:nth-child(2),
.amount-record-table td:nth-child(3),
.amount-record-table td:nth-child(4) {
    text-align: center !important;
}

.user-notice-card {
    display: grid;
    gap: 16px;
    min-height: 260px;
    padding: 18px !important;
}

.user-notice-content {
    min-height: 180px;
    padding: 16px;
    border: 1px solid #e5edf5;
    border-radius: 14px;
    background: #fff;
    color: #263244;
    line-height: 1.7;
    white-space: normal;
}

.user-charge-tip {
    border-radius: 12px !important;
}

.balance-status {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.balance-status.ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.balance-status.bad {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

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

.plugin-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 18px;
    border: 1px solid #dfe7f1;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 16px 42px rgba(24, 39, 75, 0.08);
}

.plugin-card-wide {
    grid-column: auto;
    grid-template-columns: 44px minmax(0, 1fr) 128px;
    align-items: center;
}

.plugin-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(180deg, #35c982 0%, #159a61 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.plugin-body {
    display: grid;
    gap: 8px;
}

.plugin-body h2 {
    margin: 0;
    color: #10233f;
    font-size: 18px;
    font-weight: 600;
}

.plugin-body p {
    margin: 0;
    color: #667892;
    font-size: 13px;
    line-height: 1.6;
}

.plugin-switch {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 118px;
    min-height: 34px;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    background: #f3f6fa;
    color: #667892;
    cursor: pointer;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
}

.plugin-switch span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #94a3b8;
}

.plugin-switch.on {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

.plugin-switch.on span {
    background: #10b981;
}

.plugin-refresh-field {
    display: grid;
    gap: 6px;
    max-width: 220px;
    color: #526176;
}

.plugin-refresh-field input {
    min-height: 40px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    padding: 0 12px;
}

.plugin-card .primary-btn {
    grid-column: 3;
    justify-self: end;
    width: 120px;
    min-height: 38px;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    text-align: center;
}

.plugin-card-analytics {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 18px;
}

.plugin-analytics-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.plugin-analytics-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.plugin-analytics-title h2 {
    margin: 0 0 6px;
    color: #10233f;
    font-size: 19px;
    font-weight: 700;
}

.plugin-analytics-title p {
    margin: 0;
    color: #667892;
    font-size: 13px;
    line-height: 1.65;
}

.plugin-icon.analytics-icon {
    background: linear-gradient(180deg, #34d399 0%, #0f766e 100%);
}

.plugin-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    background: #f3f6fa;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.plugin-status.on {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
}

.plugin-analytics-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    padding: 12px 14px;
    border: 1px solid #dfe7f1;
    border-radius: 14px;
    background: #f8fbff;
}

.plugin-analytics-control small {
    color: #667892;
    font-size: 12px;
}

.plugin-toggle-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #10233f;
    cursor: pointer;
    user-select: none;
}

.plugin-toggle-line input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plugin-toggle-line span {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background .18s ease;
}

.plugin-toggle-line span::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
    transition: transform .18s ease;
}

.plugin-toggle-line input:checked + span {
    background: #10b981;
}

.plugin-toggle-line input:checked + span::after {
    transform: translateX(18px);
}

.plugin-toggle-line input:disabled + span {
    opacity: .55;
}

.plugin-code-field {
    display: grid;
    gap: 8px;
    color: #526176;
    font-size: 13px;
    font-weight: 700;
}

.plugin-code-field textarea {
    width: 100%;
    min-height: 180px;
    resize: vertical;
    border: 1px solid #dbe5f0;
    border-radius: 14px;
    padding: 14px;
    background: #0f172a;
    color: #d7fbe8;
    font-family: Consolas, "SFMono-Regular", "Microsoft YaHei", monospace;
    font-size: 13px;
    line-height: 1.55;
    box-sizing: border-box;
}

.plugin-code-field textarea::placeholder {
    color: rgba(215, 251, 232, .52);
}

.plugin-code-field textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .16);
}

.plugin-analytics-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.plugin-analytics-actions p {
    margin: 0;
    color: #667892;
    font-size: 12px;
    line-height: 1.6;
}

.plugin-analytics-actions div {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.plugin-card-analytics .primary-btn,
.plugin-card-analytics .secondary-btn {
    grid-column: auto;
    justify-self: auto;
    width: auto;
    min-width: 108px;
    min-height: 38px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .plugin-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .plugin-card-wide,
    .plugin-card-analytics {
        grid-column: 1 / -1;
    }

    .plugin-card-wide {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .plugin-card-wide .primary-btn {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .plugin-analytics-head,
    .plugin-analytics-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .plugin-analytics-actions div {
        width: 100%;
    }

    .plugin-card-analytics .primary-btn,
    .plugin-card-analytics .secondary-btn {
        flex: 1 1 0;
    }
}

.admin-body .readonly-control,
.admin-body input[readonly],
.admin-body select:disabled {
    background: #f3f6fa !important;
    color: #667892 !important;
    cursor: not-allowed !important;
}

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

.user-recharge-card {
    display: grid;
    gap: 16px;
    padding: 20px !important;
}

.user-recharge-card label,
.recharge-card-create label {
    display: grid;
    gap: 7px;
    color: #526176;
    font-weight: 400;
}

.user-recharge-card input,
.recharge-card-create input,
.recharge-card-result textarea {
    min-height: 42px;
    border: 1px solid #dbe5f0;
    border-radius: 10px;
    background: #fff;
    font-weight: 400;
}

.user-recharge-card button {
    width: 170px;
    min-height: 42px;
    border-radius: 10px;
    font-weight: 400;
}

.user-recharge-card button:disabled {
    background: #cbd5e1 !important;
    color: #64748b !important;
    cursor: not-allowed;
}

.recharge-card-layout {
    grid-template-columns: minmax(360px, 0.68fr) minmax(0, 1.32fr) !important;
    align-items: start !important;
}

.recharge-card-create {
    align-self: start;
}

.recharge-card-result {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid #dfeee8;
    border-radius: 12px;
    background: #f4fbf7;
}

.recharge-card-result strong {
    color: #0f766e;
    font-weight: 400;
}

.recharge-card-result .compact-head {
    align-items: center;
    padding-bottom: 0;
    border-bottom: 0;
}

.recharge-card-result-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.recharge-card-result textarea {
    padding: 10px 12px;
    min-height: 120px;
    max-height: 180px;
    resize: vertical;
}

.recharge-card-toolbar {
    justify-content: space-between;
    margin: 8px 0 10px;
}

@media (max-width: 1180px) {
    .user-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .user-publish-card,
    .user-notice-card,
    .user-log-card {
        grid-column: auto;
        grid-row: auto;
    }

    .user-recharge-grid,
    .recharge-card-layout,
    .user-price-strip,
    .publish-price-panel {
        grid-template-columns: 1fr !important;
    }
}

.nav-locked {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    color: rgba(203, 213, 225, 0.58);
    font-size: 13px;
    cursor: not-allowed;
}

.nav-locked.top {
    min-height: 42px;
    gap: 10px;
    padding: 0 12px;
    font-size: 14px;
}

.nav-locked i {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 7px;
    background: rgba(255,255,255,0.05);
    color: inherit;
    font-size: 12px;
    font-weight: 700;
    font-style: normal;
}

.nav-locked em {
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    color: rgba(226, 232, 240, 0.68);
    font-size: 11px;
    font-style: normal;
}

.license-limit-note,
.license-field-note {
    display: block;
    margin-top: 8px;
    color: #b45309;
    font-size: 13px;
    font-weight: 700;
}

.license-card-locked {
    position: relative;
    border-color: #e2e8f0 !important;
    background: #f8fafc !important;
}

.license-card-locked input,
.license-card-locked textarea,
.license-card-locked select {
    background: #eef2f7 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
}

.primary-btn:disabled,
.secondary-btn:disabled,
.template-use.is-disabled,
.disabled-like {
    border-color: #cbd5e1 !important;
    background: #e2e8f0 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.settings-subnav-locked {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    background: #eef2f7;
    color: #64748b;
    font-weight: 800;
    cursor: not-allowed;
}

.ad-time-tabs label.is-disabled {
    opacity: .55;
    cursor: not-allowed;
}

.license-status-stat {
    display: grid;
    align-content: start;
    gap: 8px;
}

.license-status-stat .license-state {
    margin-top: 4px;
}

.license-status-stat small {
    color: #64748b;
    font-size: 12px;
}

.license-action-btn {
    width: max-content;
    min-height: 34px;
    margin-top: 2px;
    padding: 0 14px;
    border: 1px solid #d7e2ef;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.license-action-btn.active {
    border-color: #b91c1c;
    background: linear-gradient(135deg, #d51f1f, #b60000);
    color: #fff;
    box-shadow: 0 8px 18px rgba(182, 0, 0, 0.18);
}

.license-action-btn.permanent,
.license-action-btn.permanent:disabled {
    border-color: #b7ead3 !important;
    background: #dff8ec !important;
    color: #138057 !important;
    cursor: default !important;
    opacity: 1 !important;
    pointer-events: none;
}

.dashboard-console-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(330px, 0.82fr);
    align-items: start;
}

.dashboard-console-grid .license-feed-panel:first-child {
    grid-row: span 2;
}

.program-info-panel {
    align-self: start;
    border-color: #dbeafe;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.program-info-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.program-info-list div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 38px;
    padding: 9px 0;
    border-bottom: 1px solid #edf2f7;
}

.program-info-list div:last-child {
    border-bottom: 0;
}

.program-info-list dt {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.program-info-list dd {
    min-width: 0;
    margin: 0;
    color: #172033;
    line-height: 1.6;
    word-break: break-word;
}

.program-info-list a:not(.primary-btn),
.link-btn {
    border: 0;
    background: transparent;
    color: #1f5aa6;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.link-btn:disabled {
    color: #94a3b8;
    cursor: wait;
}

.primary-btn.compact {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 7px;
    font-size: 12px;
}

.update-result,
.license-modal-message {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    line-height: 1.6;
}

.update-result.ok,
.license-modal-message.ok {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.update-result.warn {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.update-result.error,
.license-modal-message.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.update-apply-btn {
    margin-top: 10px;
}

.update-apply-btn[hidden] {
    display: none !important;
}

.crawler-trial-alert {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid #f6b73c;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff7df, #fffdf7);
    color: #a45200;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(164, 82, 0, 0.08);
}

.crawler-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 380px));
    gap: 16px;
    align-items: start;
}

.crawler-mini-card {
    display: grid;
    gap: 13px;
    min-height: 248px;
    padding: 15px;
    border: 1px solid #d7e3f1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(20, 40, 70, 0.08);
}

.crawler-mini-top,
.crawler-mini-settings,
.crawler-mini-foot,
.crawler-mini-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crawler-mini-top {
    justify-content: space-between;
}

.crawler-mini-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.crawler-mini-title span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid #c8def4;
    border-radius: 8px;
    background: #f3f8ff;
    color: #17436f;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.crawler-mini-title small {
    color: #7c8da5;
    font-size: 12px;
    font-weight: 700;
}

.crawler-mini-state {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    background: #eef2f7;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.crawler-mini-state::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14);
}

.crawler-mini-state.active {
    background: #dcfce7;
    color: #047857;
}

.crawler-mini-state.active::before {
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.crawler-mini-state.paused,
.crawler-mini-state.expired {
    background: #fff1f2;
    color: #be123c;
}

.crawler-mini-state.paused::before,
.crawler-mini-state.expired::before {
    background: #f43f5e;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.14);
}

.crawler-dispatch-note {
    padding: 9px 11px;
    border: 1px solid #f7c76a;
    border-radius: 8px;
    background: #fff8e6;
    color: #9a4300;
    font-size: 12px;
    line-height: 1.55;
}

.crawler-dispatch-note.running {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #047857;
    font-weight: 900;
}

.crawler-dispatch-note.inactive {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
}

.crawler-dispatch-note.paused,
.crawler-dispatch-note.expired {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.crawler-mini-settings {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 58px;
    padding: 10px 11px;
    border: 1px solid #d8e5f3;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.crawler-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 40px;
    cursor: pointer;
    user-select: none;
}

.crawler-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.crawler-switch-track {
    position: relative;
    width: 46px;
    height: 24px;
    flex: 0 0 46px;
    border-radius: 999px;
    background: #cbd5e1;
    box-shadow: inset 0 0 0 1px rgba(71, 85, 105, 0.12);
    transition: background .18s ease, box-shadow .18s ease;
}

.crawler-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
    transition: transform .18s ease;
}

.crawler-switch input:checked + .crawler-switch-track {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.crawler-switch input:checked + .crawler-switch-track::after {
    transform: translateX(22px);
}

.crawler-switch-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.crawler-switch-text strong {
    color: #1f2f46;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.crawler-switch-text small {
    color: #738196;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crawler-interval {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin-left: auto;
    min-width: 0;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.crawler-interval input {
    width: 54px;
    min-height: 34px;
    padding: 0 8px;
    border: 1px solid #c6d4e4;
    border-radius: 8px;
    background: #ffffff;
    color: #172033;
    font-size: 13px;
    font-weight: 800;
}

.crawler-interval em {
    color: #64748b;
    font-style: normal;
    font-weight: 700;
}

.crawler-mini-settings .compact {
    min-height: 38px;
    padding-inline: 14px;
}

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

.crawler-mini-metrics div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 10px 6px 9px;
    border: 1px solid #dfe8f4;
    border-radius: 8px;
    background: #fbfdff;
    text-align: center;
}

.crawler-mini-metrics strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 22px;
    line-height: 1;
    text-overflow: ellipsis;
}

.crawler-mini-metrics span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.crawler-mini-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    color: #52657c;
    font-size: 12px;
    line-height: 1.35;
}

.crawler-mini-actions {
    flex-wrap: wrap;
    gap: 9px;
}

.crawler-mini-actions form {
    margin: 0;
}

.crawler-source-form {
    flex: 1 1 178px;
}

.crawler-source-switch {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 36px;
    padding: 0 10px 0 12px;
    border: 1px solid #d6e0ec;
    border-radius: 8px;
    background: #f8fbff;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.crawler-source-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.crawler-source-switch i {
    position: relative;
    flex: 0 0 auto;
    width: 38px;
    height: 21px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: .18s ease;
}

.crawler-source-switch i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .2);
    transition: .18s ease;
}

.crawler-source-switch input:checked + i {
    background: #16a34a;
}

.crawler-source-switch input:checked + i::after {
    transform: translateX(17px);
}

.crawler-conflict-btn {
    position: relative;
}

.crawler-mini-actions .compact {
    min-height: 36px;
    padding: 0 13px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
}

.crawler-conflict-btn i {
    position: absolute;
    top: -7px;
    right: -7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 6px 12px rgba(239, 68, 68, 0.28);
}

.crawler-modal[hidden] {
    display: none !important;
}

.crawler-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.crawler-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.46);
}

.crawler-modal-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(980px, 96vw);
    max-height: min(720px, 90vh);
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.crawler-modal-head,
.crawler-modal-pages {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5edf7;
}

.crawler-modal-head h2 {
    margin: 0;
    color: #172033;
    font-size: 18px;
}

.crawler-modal-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}

.crawler-modal-head button[data-crawler-close] {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #d7e1ed;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.crawler-modal-body {
    min-height: 240px;
    overflow: auto;
    padding: 14px;
}

.crawler-modal-table {
    overflow: auto;
    border: 1px solid #e5edf7;
    border-radius: 8px;
}

.crawler-modal-table table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.crawler-runs-table table {
    min-width: 720px;
    table-layout: auto;
}

.crawler-modal-table th,
.crawler-modal-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #eef2f7;
    color: #334155;
    font-size: 12px;
    text-align: left;
    vertical-align: top;
}

.crawler-modal-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 900;
    white-space: nowrap;
}

.crawler-modal-table td:last-child {
    min-width: 160px;
}

.crawler-runs-table th:nth-child(1),
.crawler-runs-table td:nth-child(1) {
    width: 150px;
}

.crawler-runs-table th:nth-child(2),
.crawler-runs-table td:nth-child(2),
.crawler-runs-table th:nth-child(3),
.crawler-runs-table td:nth-child(3) {
    width: 72px;
    text-align: center;
}

.crawler-runs-table th:nth-child(4),
.crawler-runs-table td:nth-child(4) {
    min-width: 360px;
}

.crawler-time-cell {
    white-space: nowrap;
}

.crawler-num-cell {
    font-variant-numeric: tabular-nums;
}

.crawler-message-cell {
    min-width: 260px !important;
    line-height: 1.5;
    word-break: break-word;
}

.crawler-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.crawler-status-badge.success {
    background: #dcfce7;
    color: #15803d;
}

.crawler-status-badge.failed {
    background: #fee2e2;
    color: #b91c1c;
}

.crawler-status-badge.running {
    background: #dbeafe;
    color: #1d4ed8;
}

.crawler-status-badge.muted {
    background: #f1f5f9;
    color: #64748b;
}

.crawler-modal-pages {
    border-top: 1px solid #e5edf7;
    border-bottom: 0;
}

.crawler-modal-pages span {
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .crawler-mini-grid {
        grid-template-columns: 1fr;
    }

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

    .crawler-modal {
        padding: 10px;
    }
}

@media (max-width: 420px) {
    .crawler-mini-settings {
        flex-wrap: wrap;
    }

    .crawler-interval {
        margin-left: 54px;
    }
}

.license-activate-dialog {
    width: min(500px, 96vw);
}

.license-code-field {
    margin-top: 14px;
}

.license-code-field input {
    min-height: 44px;
    border-radius: 10px;
    font-weight: 700;
}

.license-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.license-page-lock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    border-color: #f4d18f;
    background: linear-gradient(135deg, #fff9ed, #ffffff);
    box-shadow: 0 12px 28px rgba(180, 83, 9, 0.08);
}

.license-page-lock span {
    display: inline-flex;
    min-height: 24px;
    padding: 0 8px;
    align-items: center;
    border-radius: 999px;
    background: #fff3d5;
    color: #b45309;
    font-size: 12px;
    font-weight: 900;
}

.license-page-lock strong {
    display: block;
    margin-top: 7px;
    color: #172033;
    font-size: 20px;
}

.license-page-lock p {
    margin: 6px 0 0;
    color: #64748b;
    line-height: 1.6;
}

.demo-mode-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    border-color: #fed7aa;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    color: #7c2d12;
    box-shadow: 0 12px 28px rgba(194, 65, 12, 0.08);
}

.demo-mode-banner strong {
    font-size: 16px;
    font-weight: 900;
    color: #9a3412;
    white-space: nowrap;
}

.demo-mode-banner span {
    flex: 1;
    color: #9a3412;
    line-height: 1.6;
}

.license-locked-page {
    position: relative;
    filter: grayscale(0.9);
    opacity: 0.56;
}

.license-locked-page::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 20;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.18);
    cursor: not-allowed;
}

.license-locked-page a,
.license-locked-page button,
.license-locked-page input,
.license-locked-page select,
.license-locked-page textarea {
    cursor: not-allowed !important;
}

@media (max-width: 980px) {
    .dashboard-console-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-console-grid .license-feed-panel:first-child {
        grid-row: auto;
    }

    .license-page-lock {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .program-info-list div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .license-action-btn {
        width: 100%;
    }
}

/* PC-only layout lock */
html,
body {
    min-width: 1280px;
    overflow-x: auto;
}

body.front-body {
    min-width: 980px;
}

body.install-body {
    min-width: 1180px;
}

.admin-body .admin-shell {
    grid-template-columns: 260px minmax(0, 1fr) !important;
    min-width: 1180px;
}

.admin-body .admin-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 40 !important;
    width: 260px !important;
    height: 100vh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.admin-body .admin-workspace {
    grid-column: 2 !important;
    min-width: 0 !important;
}

.admin-body .admin-main {
    width: min(100% - 40px, 1280px) !important;
}

.admin-body .admin-topbar,
.admin-body .page-head,
.shell-header,
.front-header,
.template-banner {
    flex-direction: row !important;
    align-items: center !important;
}

.admin-body .form-grid,
.install-body .form-grid,
.shell-main .form-grid,
.admin-body .check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.admin-body .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.span-2 {
    grid-column: span 2 !important;
}
