﻿:root {
    --bg: #04111f;
    --bg-deep: #01070f;
    --surface: rgba(8, 20, 38, 0.88);
    --surface-strong: rgba(9, 22, 43, 0.95);
    --text: #eef8ff;
    --muted: #8ba8c1;
    --line: rgba(82, 191, 255, 0.2);
    --line-strong: rgba(82, 191, 255, 0.44);
    --brand: #39d6ff;
    --brand-strong: #68e4ff;
    --brand-deep: #0b84ff;
    --success: #78ffcb;
    --warning: #ff9d6c;
    --danger: #ff759f;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(11, 132, 255, 0.2), transparent 28%),
        radial-gradient(circle at top right, rgba(57, 214, 255, 0.13), transparent 26%),
        linear-gradient(160deg, #03101c 0%, #06192b 42%, #010811 100%);
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

body.query-page,
body.admin-page {
    position: relative;
    display: grid;
    place-items: center;
}

body.query-page {
    min-height: 100vh;
    padding: 0;
}

body.admin-page {
    min-height: 100vh;
    padding: 28px 0;
}

body.query-page::before,
body.admin-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(97, 188, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(97, 188, 255, 0.06) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at center, black 42%, transparent 88%);
    pointer-events: none;
}

body.query-page::after,
body.admin-page::after {
    content: "";
    position: fixed;
    left: 50%;
    top: -120px;
    width: min(780px, 84vw);
    height: 360px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(57, 214, 255, 0.16), transparent 68%);
    filter: blur(10px);
    animation: ambientFloat 9s ease-in-out infinite;
    pointer-events: none;
}

.page-center-shell {
    width: min(100% - 24px, 1180px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.query-page .page-center-shell {
    min-height: 100vh;
    padding: 0;
}

.admin-page .page-center-shell {
    min-height: calc(100vh - 56px);
}

.center-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.center-panel,
.query-card,
.panel,
.login-card,
.admin-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(8, 20, 38, 0.94), rgba(4, 12, 24, 0.9));
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.center-panel::before,
.query-card::before,
.panel::before,
.login-card::before,
.admin-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(57, 214, 255, 0.08) 28%, transparent 54%);
    transform: translateX(-100%);
    animation: sweep 7.2s linear infinite;
    pointer-events: none;
}

.brand-mark {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.brand-logo-shell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 28px;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(57, 214, 255, 0.18);
}

.brand-logo-shell-query {
    width: min(180px, 46vw);
    padding: 8px;
}

.brand-logo-shell-hero {
    width: min(240px, 38vw);
}

.brand-logo-shell-login {
    width: min(220px, 62vw);
}

.brand-logo-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    object-fit: contain;
}

.query-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    color: var(--brand);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    background: rgba(57, 214, 255, 0.08);
    border: 1px solid rgba(57, 214, 255, 0.24);
}

.query-title,
.admin-hero h1,
.panel h2,
.login-card h2 {
    margin: 0;
    font-family: "Bahnschrift", "Segoe UI", sans-serif;
    letter-spacing: 0.04em;
}

.query-title {
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 700;
    text-shadow: 0 0 24px rgba(57, 214, 255, 0.18);
}

.query-subtitle,
.admin-hero p,
.panel-text,
.panel-subtitle {
    margin: 14px auto 0;
    max-width: 720px;
    color: var(--muted);
    line-height: 1.9;
    font-size: 15px;
    text-align: center;
}

.query-shell {
    width: min(100% - 24px, 780px);
}

.query-card {
    width: 100%;
    padding: 42px 40px 38px;
    text-align: center;
    animation: panelReveal 0.7s ease both;
}

.query-form,
.toolbar-form {
    width: 100%;
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: flex-end;
    flex-wrap: wrap;
}

.query-input-wrap {
    width: min(100%, 460px);
    text-align: center;
}

.query-input-label,
label {
    display: block;
    margin-bottom: 8px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-align: center;
}

.query-input,
input,
select,
textarea {
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid rgba(97, 188, 255, 0.18);
    border-radius: var(--radius-sm);
    background: rgba(5, 15, 29, 0.9);
    color: var(--text);
    font: inherit;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.query-input {
    font-size: 16px;
    letter-spacing: 0.02em;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: rgba(139, 168, 193, 0.78);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(57, 214, 255, 0.1), 0 0 24px rgba(57, 214, 255, 0.1);
    transform: translateY(-1px);
}

button,
.button-primary,
.button-secondary,
.button-text,
.button-danger {
    border: none;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.button-primary,
.button-secondary,
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 22px;
    border-radius: 999px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button-primary:hover,
.button-secondary:hover,
.button-danger:hover,
.button-text:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #03111d;
    font-weight: 700;
    background: linear-gradient(135deg, #8df0ff, var(--brand));
    box-shadow: 0 16px 34px rgba(11, 132, 255, 0.3);
}

.button-secondary {
    color: var(--text);
    background: rgba(11, 29, 53, 0.86);
    border: 1px solid var(--line);
}

.button-danger {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    color: var(--danger);
    background: rgba(255, 117, 159, 0.13);
}

.button-text {
    color: var(--brand);
    background: transparent;
    padding: 0;
}

.query-submit {
    min-width: 160px;
}

.query-hint {
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-align: center;
}

.query-result {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: center;
    justify-items: center;
    margin-top: 30px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid transparent;
    text-align: center;
    animation: resultReveal 0.45s ease both;
}

.query-result-copy {
    width: 100%;
}

.query-result-icon {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
}

.query-result-icon::before {
    font-family: "Bahnschrift", "Segoe UI", sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.query-result-title {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.query-result-message {
    line-height: 1.9;
    font-size: 16px;
}

.query-result-success {
    background: linear-gradient(180deg, rgba(10, 38, 41, 0.92), rgba(7, 24, 30, 0.96));
    border-color: rgba(120, 255, 203, 0.34);
    box-shadow: 0 0 0 1px rgba(120, 255, 203, 0.08), 0 0 42px rgba(120, 255, 203, 0.12);
    color: var(--success);
}

.query-result-success .query-result-icon {
    box-shadow: inset 0 0 0 1px rgba(120, 255, 203, 0.3), 0 0 26px rgba(120, 255, 203, 0.16);
}

.query-result-success .query-result-icon::before {
    content: "OK";
}

.query-result-success .query-result-title {
    color: #d7ffef;
}

.query-result-warning,
.query-result-error {
    background: linear-gradient(180deg, rgba(44, 20, 24, 0.94), rgba(27, 11, 17, 0.97));
    border-color: rgba(255, 157, 108, 0.34);
    box-shadow: 0 0 0 1px rgba(255, 157, 108, 0.08), 0 0 42px rgba(255, 157, 108, 0.11);
    color: var(--warning);
}

.query-result-warning .query-result-icon,
.query-result-error .query-result-icon {
    box-shadow: inset 0 0 0 1px rgba(255, 157, 108, 0.28), 0 0 22px rgba(255, 157, 108, 0.14);
}

.query-result-warning .query-result-icon::before {
    content: "NO";
}

.query-result-error .query-result-icon::before {
    content: "ERR";
    font-size: 20px;
}

.query-result-warning .query-result-title,
.query-result-error .query-result-title {
    color: #ffd4c2;
}

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

.admin-hero {
    width: min(100%, 1120px);
    padding: 28px 30px;
    text-align: center;
    animation: panelReveal 0.7s ease both;
}

.admin-brand-row {
    display: grid;
    grid-template-columns: minmax(220px, 260px) 1fr;
    align-items: center;
    justify-items: center;
    gap: 24px;
}

.admin-hero-copy {
    width: 100%;
}

.admin-hero-copy h1 {
    font-size: clamp(28px, 4vw, 42px);
    text-shadow: 0 0 24px rgba(57, 214, 255, 0.18);
}

.admin-kpis {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.admin-kpi {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(8, 22, 40, 0.76);
    border: 1px solid rgba(82, 191, 255, 0.16);
    display: grid;
    gap: 8px;
    justify-items: center;
}

.admin-kpi-label {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-kpi strong {
    font-family: "Bahnschrift", "Segoe UI", sans-serif;
    font-size: 24px;
    color: var(--brand-strong);
    text-align: center;
    word-break: break-word;
}

.admin-hero-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

.login-stage {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-card,
.panel {
    width: 100%;
    padding: 28px;
    text-align: center;
}

.login-card {
    max-width: 560px;
}

.login-brand {
    display: grid;
    gap: 18px;
    justify-items: center;
    margin-bottom: 22px;
}

.panel-head,
.panel-head-center {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.panel-subtitle {
    margin-top: 0;
}

.admin-grid-pro {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.admin-form-panel {
    max-width: 100%;
}

.admin-list-panel {
    max-width: 100%;
}

.admin-panel-narrow {
    max-width: 560px;
}

.centered-message {
    width: min(100%, 960px);
    text-align: center;
}

.flash {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
}

.flash-success {
    background: rgba(18, 77, 62, 0.26);
    color: #c2ffe7;
}

.flash-error {
    background: rgba(113, 26, 57, 0.24);
    color: #ffcddd;
}

.db-error-box {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(8, 18, 33, 0.88);
    border: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
    word-break: break-word;
}

.stack-form,
.centered-form,
.admin-form {
    width: min(100%, 100%);
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.toolbar-form-center {
    width: min(100%, 780px);
    margin: 0 auto 22px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 20px;
    border: 1px solid rgba(82, 191, 255, 0.12);
    background: rgba(5, 15, 29, 0.5);
}

.center-table,
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(97, 188, 255, 0.1);
    text-align: center;
    vertical-align: middle;
    word-break: break-word;
}

th {
    color: #a6c0d8;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(8, 19, 35, 0.84);
}

.table-actions,
.table-actions-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline;
}

.error-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.empty-cell {
    color: var(--muted);
}

@keyframes ambientFloat {
    0%,
    100% {
        transform: translateX(-50%) translate3d(0, 0, 0);
    }
    50% {
        transform: translateX(-50%) translate3d(0, 18px, 0);
    }
}

@keyframes sweep {
    0% {
        transform: translateX(-120%);
    }
    55%,
    100% {
        transform: translateX(160%);
    }
}

@keyframes panelReveal {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes resultReveal {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

    .admin-grid-pro {
        width: min(100%, 900px);
    }
}

@media (max-width: 768px) {
    .page-center-shell,
    .query-shell,
    .admin-shell {
        width: min(100% - 16px, 1180px);
        gap: 16px;
    }

    .query-card,
    .panel,
    .login-card,
    .admin-hero {
        padding: 22px 18px;
        border-radius: 24px;
    }

    .brand-logo-shell {
        padding: 10px;
        border-radius: 22px;
    }

    .brand-logo-shell-query {
        width: min(168px, 54vw);
    }

    .brand-logo-shell-hero {
        width: min(220px, 62vw);
    }

    .brand-logo-shell-login {
        width: min(210px, 70vw);
    }

    .query-eyebrow {
        max-width: 100%;
        min-height: 0;
        padding: 8px 12px;
        margin-bottom: 16px;
        line-height: 1.5;
        letter-spacing: 0.14em;
    }

    .query-title {
        font-size: clamp(26px, 8.4vw, 34px);
        line-height: 1.18;
    }

    .admin-hero-copy h1,
    .panel h2,
    .login-card h2 {
        line-height: 1.2;
    }

    .query-subtitle,
    .admin-hero p,
    .panel-text,
    .panel-subtitle {
        font-size: 14px;
        line-height: 1.75;
    }

    .query-form,
    .toolbar-form {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .query-submit,
    .button-primary,
    .button-secondary {
        width: 100%;
    }

    input,
    select,
    textarea,
    button,
    .button-primary,
    .button-secondary,
    .button-danger {
        font-size: 16px;
    }

    label {
        text-align: left;
        letter-spacing: 0.14em;
    }

    .query-input-label {
        text-align: center;
    }

    input,
    select,
    textarea {
        text-align: left;
    }

    .query-input {
        text-align: center;
    }

    .query-input-wrap,
    .toolbar-form-center,
    .admin-panel-narrow,
    .admin-grid-pro {
        width: 100%;
        max-width: 100%;
    }

    .admin-brand-row,
    .admin-grid-pro {
        gap: 18px;
    }

    .admin-kpis {
        gap: 12px;
    }

    .admin-kpi {
        padding: 14px;
        border-radius: 18px;
    }

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

    .admin-hero-actions,
    .admin-hero-actions .button-secondary {
        width: 100%;
    }

    .stack-form,
    .centered-form,
    .admin-form {
        gap: 14px;
    }

    textarea {
        min-height: 104px;
    }

    .center-table,
    table {
        min-width: 640px;
    }
}

@media (max-width: 640px) {
    .table-wrap {
        overflow: visible;
        border: none;
        background: transparent;
    }

    .center-table {
        min-width: 0;
    }

    .center-table thead {
        display: none;
    }

    .center-table,
    .center-table tbody,
    .center-table tr,
    .center-table td {
        display: block;
        width: 100%;
    }

    .center-table tbody {
        display: grid;
        gap: 12px;
    }

    .center-table tr {
        padding: 14px;
        border: 1px solid rgba(82, 191, 255, 0.16);
        border-radius: 18px;
        background: rgba(5, 15, 29, 0.72);
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
    }

    .center-table td {
        display: grid;
        grid-template-columns: minmax(76px, 90px) minmax(0, 1fr);
        align-items: start;
        gap: 12px;
        padding: 10px 0;
        text-align: left;
    }

    .center-table td::before {
        color: var(--brand);
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .center-table td:nth-child(1)::before {
        content: "姓名";
    }

    .center-table td:nth-child(2)::before {
        content: "微信号";
    }

    .center-table td:nth-child(3)::before {
        content: "会员等级";
    }

    .center-table td:nth-child(4)::before {
        content: "备注";
    }

    .center-table td:nth-child(5)::before {
        content: "更新时间";
    }

    .center-table td:nth-child(6)::before {
        content: "操作";
    }

    .center-table td:first-child {
        padding-top: 0;
    }

    .center-table td:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    .center-table td[colspan] {
        display: block;
        padding: 4px 0 0;
        text-align: center;
    }

    .center-table td[colspan]::before {
        content: none;
    }

    .table-actions,
    .table-actions-center {
        justify-content: flex-start;
        gap: 10px;
    }

    .button-text {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 0 14px;
        border-radius: 12px;
        border: 1px solid rgba(82, 191, 255, 0.16);
        background: rgba(11, 29, 53, 0.5);
    }

    .inline-form {
        width: 100%;
    }

    .inline-form .button-danger {
        width: 100%;
        min-height: 44px;
    }
}

@media (max-width: 560px) {
    .page-center-shell,
    .query-shell,
    .admin-shell {
        width: min(100% - 12px, 1180px);
    }

    .query-card,
    .panel,
    .login-card,
    .admin-hero {
        padding: 20px 14px;
        border-radius: 20px;
    }

    .brand-logo-shell-query {
        width: min(156px, 60vw);
    }

    .query-title {
        font-size: clamp(24px, 9vw, 30px);
    }

    .query-result {
        margin-top: 24px;
        padding: 18px 14px;
        gap: 14px;
        border-radius: 20px;
    }

    .query-result-icon {
        width: 68px;
        height: 68px;
        border-radius: 18px;
    }

    .query-result-title {
        font-size: 18px;
    }

    .query-result-message {
        font-size: 15px;
        line-height: 1.75;
    }

    .query-hint {
        font-size: 12px;
        line-height: 1.7;
        letter-spacing: 0.05em;
    }

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

@media (hover: none) {
    .button-primary:hover,
    .button-secondary:hover,
    .button-danger:hover,
    .button-text:hover {
        transform: none;
    }
}


