.customer-service-query-page,
.customer-service-query-page * {
    box-sizing: border-box;
}

.customer-service-query-page {
    --query-bg: #03031E;
    --query-panel: rgba(10, 13, 43, 0.82);
    --query-panel-strong: rgba(10, 14, 48, 0.94);
    --query-border: rgba(143, 151, 255, 0.18);
    --query-border-hover: rgba(62, 185, 251, 0.42);
    --query-text: #f5f6ff;
    --query-muted: #a5abc8;
    --query-blue: #3EB9FB;
    --query-purple: #8068f2;
    --query-pink: #FF3CC5;
    --query-danger: #ff778a;
    --query-warning: #f6bd5c;
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - var(--header-height, 4rem));
    overflow: hidden;
    color: var(--query-text);
    background: radial-gradient(circle at right, #6859E2 0, #03031E 10rem, #03031E 100%);
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.customer-service-query-page::before {
    content: "";
    position: absolute;
    top: 2rem;
    left: -8rem;
    z-index: -1;
    width: 34rem;
    height: 34rem;
    pointer-events: none;
    background: radial-gradient(circle, rgba(62, 185, 251, 0.08), transparent 68%);
}

.customer-service-query-page [hidden] {
    display: none !important;
}

.customer-query-shell {
    width: min(76rem, calc(100% - 3rem));
    margin: 0 auto;
    padding: clamp(3.5rem, 6vw, 5.25rem) 0 4.5rem;
}

.query-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(23rem, 0.85fr);
    align-items: center;
    gap: clamp(3rem, 6vw, 6.5rem);
}

.hero-copy {
    padding: 0.75rem 0;
}

.official-badge,
.verification-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #7dd8ff;
    font-weight: 700;
}

.official-badge {
    padding: 0.42rem 0.75rem;
    border: 1px solid rgba(62, 185, 251, 0.28);
    border-radius: 999px;
    background: rgba(62, 185, 251, 0.07);
    font-size: 0.8rem;
}

.official-badge svg,
.verification-status svg,
.query-privacy svg,
.security-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
}

.hero-copy h1 {
    margin: 1.3rem 0 1rem;
    color: #fff;
    font-size: clamp(2.8rem, 5vw, 4.25rem);
    font-weight: 750;
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero-copy h1::after {
    content: "";
    display: block;
    width: 4.5rem;
    height: 0.22rem;
    margin-top: 1.15rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--query-blue), var(--query-purple));
}

.hero-description {
    max-width: 37rem;
    margin: 0;
    color: #b5bad3;
    font-size: 1rem;
    line-height: 1.85;
}

.trust-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.trust-list li {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem;
    color: var(--query-muted);
    font-size: 0.78rem;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.025);
}

.trust-list li > span:last-child {
    min-width: 0;
}

.trust-list strong {
    display: block;
    margin-bottom: 0.08rem;
    color: #f2f4ff;
    font-size: 0.85rem;
}

.trust-icon {
    display: grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    flex: 0 0 auto;
    border-radius: 0.55rem;
    color: #74d9f4;
    background: rgba(62, 185, 251, 0.08);
}

.trust-icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

.query-card,
.result-card,
.security-notice {
    border: 1px solid var(--query-border);
    background: var(--query-panel);
    box-shadow: 0 1.4rem 3.8rem rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(0.9rem);
}

.query-card {
    position: relative;
    padding: clamp(1.5rem, 3vw, 2.15rem);
    overflow: hidden;
    border-radius: 1.2rem;
}

.query-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.2rem;
    background: linear-gradient(90deg, var(--query-blue), var(--query-purple), var(--query-pink));
}

.query-card-heading {
    margin-bottom: 1.55rem;
}

.query-card-heading h2,
.section-heading h2,
.security-notice h2 {
    margin: 0;
    color: #fff;
}

.query-card-heading h2 {
    font-size: 1.3rem;
}

.query-card-heading p,
.query-privacy,
.result-state p,
.security-notice p,
.section-heading p {
    margin: 0;
    color: var(--query-muted);
}

.query-card-heading p {
    margin-top: 0.3rem;
    font-size: 0.84rem;
}

.query-form {
    display: grid;
    gap: 1.05rem;
}

.query-field label {
    display: inline-block;
    margin-bottom: 0.48rem;
    color: #e1e4f3;
    font-size: 0.86rem;
    font-weight: 700;
}

.input-shell {
    display: flex;
    align-items: center;
    min-height: 3.45rem;
    padding: 0 0.9rem;
    border: 1px solid rgba(160, 166, 214, 0.2);
    border-radius: 0.78rem;
    background: rgba(3, 3, 30, 0.7);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.input-shell:hover {
    border-color: rgba(160, 166, 214, 0.34);
}

.input-shell:focus-within {
    border-color: rgba(62, 185, 251, 0.72);
    background: rgba(3, 3, 30, 0.9);
    box-shadow: 0 0 0 3px rgba(62, 185, 251, 0.1);
}

.input-shell.has-error {
    border-color: var(--query-danger);
    box-shadow: 0 0 0 3px rgba(255, 119, 138, 0.08);
}

.input-shell > svg,
.clear-input svg {
    width: 1.15rem;
    height: 1.15rem;
}

.input-shell > svg {
    flex: 0 0 auto;
    margin-right: 0.72rem;
    color: #8992ba;
}

.input-shell input {
    width: 100%;
    min-width: 0;
    padding: 0.85rem 0;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font: inherit;
}

.input-shell input::placeholder {
    color: #737a9a;
}

.clear-input {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #a1a7c4;
    background: transparent;
    cursor: pointer;
}

.clear-input:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.field-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    min-height: 1.2rem;
    margin-top: 0.35rem;
    color: #777f9f;
    font-size: 0.72rem;
}

.field-error {
    color: #ff95a3;
}

.query-button,
.customer-list-refresh,
.retry-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 0;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.query-button {
    min-height: 3.4rem;
    margin-top: 0.3rem;
    border-radius: 0.78rem;
    background: linear-gradient(105deg, #397fe8 0%, #6c6bea 55%, #9a60ed 100%);
    box-shadow: 0 0.8rem 1.8rem rgba(83, 82, 220, 0.25);
}

.query-button:hover:not(:disabled) {
    filter: brightness(1.08);
    box-shadow: 0 1rem 2.2rem rgba(83, 82, 220, 0.34);
}

.query-button svg,
.customer-list-refresh svg {
    width: 1.1rem;
    height: 1.1rem;
}

.query-button:focus-visible,
.customer-list-refresh:focus-visible,
.retry-button:focus-visible,
.clear-input:focus-visible {
    outline: 2px solid var(--query-blue);
    outline-offset: 3px;
}

.query-button:disabled,
.customer-list-refresh:disabled {
    opacity: 0.55;
    cursor: wait;
}

.query-privacy {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 1rem;
    font-size: 0.72rem;
    line-height: 1.6;
}

.result-section {
    margin-top: clamp(3.5rem, 6vw, 5rem);
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.1rem;
}

.section-heading h2 {
    font-size: clamp(1.65rem, 3vw, 2.1rem);
}

.section-heading p {
    font-size: 0.82rem;
}

.result-card {
    min-height: 14rem;
    padding: clamp(1.35rem, 3vw, 2.2rem);
    border-radius: 1.15rem;
}

.result-state {
    min-height: 9.5rem;
}

.result-idle,
.result-loading,
.result-empty,
.result-error,
.result-pending {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.result-state h3 {
    margin: 0.8rem 0 0.3rem;
    color: #fff;
    font-size: 1.08rem;
}

.state-illustration {
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border: 1px solid rgba(62, 185, 251, 0.14);
    border-radius: 1rem;
    color: #79baff;
    background: rgba(62, 185, 251, 0.06);
}

.state-illustration svg {
    width: 2.55rem;
    height: 2.55rem;
}

.state-illustration-warning {
    color: var(--query-warning);
}

.state-illustration-error {
    color: var(--query-danger);
}

.loading-ring {
    width: 2.8rem;
    height: 2.8rem;
    border: 3px solid rgba(128, 104, 242, 0.18);
    border-top-color: #9b7cff;
    border-radius: 50%;
    animation: query-spin 0.8s linear infinite;
}

@keyframes query-spin {
    to {
        transform: rotate(360deg);
    }
}

.retry-button {
    min-height: 2.6rem;
    margin-top: 1rem;
    padding: 0.55rem 1rem;
    border: 1px solid rgba(128, 104, 242, 0.34);
    border-radius: 0.65rem;
    background: rgba(128, 104, 242, 0.1);
}

.retry-button:hover {
    border-color: rgba(128, 104, 242, 0.58);
    background: rgba(128, 104, 242, 0.16);
}

.customer-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.verification-status {
    color: #77d9bf;
    font-size: 0.9rem;
}

#customer-list-count {
    margin: 0.25rem 0 0;
    color: var(--query-muted);
    font-size: 0.78rem;
}

.customer-list-refresh {
    min-height: 2.6rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(62, 185, 251, 0.2);
    border-radius: 0.65rem;
    background: rgba(62, 185, 251, 0.06);
}

.customer-list-refresh:hover:not(:disabled) {
    border-color: rgba(62, 185, 251, 0.42);
    background: rgba(62, 185, 251, 0.1);
}

.customer-service-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.customer-service-card {
    padding: 1.15rem;
    border: 1px solid rgba(143, 151, 255, 0.14);
    border-radius: 0.85rem;
    background: rgba(3, 3, 30, 0.58);
}

.customer-card-heading {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.customer-card-avatar {
    display: grid;
    place-items: center;
    width: 3.3rem;
    height: 3.3rem;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(62, 185, 251, 0.24);
    border-radius: 0.8rem;
    color: #7fdcf2;
    background: rgba(62, 185, 251, 0.07);
}

.customer-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customer-card-avatar svg {
    width: 1.8rem;
    height: 1.8rem;
}

.customer-card-label {
    color: #77d9bf;
    font-size: 0.7rem;
    font-weight: 700;
}

.customer-card-heading h3 {
    margin: 0.12rem 0 0;
    overflow: hidden;
    color: #fff;
    font-size: 1.08rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-card-details {
    display: grid;
    gap: 0.62rem;
    margin: 0.95rem 0 0;
}

.customer-card-details div {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.7rem;
}

.customer-card-details dt {
    color: #858daa;
}

.customer-card-details dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #e0e3f2;
}

.security-notice {
    display: flex;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 1.15rem 1.3rem;
    border-radius: 0.9rem;
    box-shadow: none;
}

.security-icon {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    flex: 0 0 auto;
    border-radius: 0.65rem;
    color: var(--query-warning);
    background: rgba(246, 189, 92, 0.07);
}

.security-notice h2 {
    font-size: 0.96rem;
}

.security-notice p {
    margin-top: 0.3rem;
    font-size: 0.82rem;
    line-height: 1.7;
}



@media (prefers-reduced-motion: reduce) {
    .input-shell,
    .query-button,
    .customer-list-refresh,
    .retry-button,
    .clear-input {
        transition: none;
    }

    .loading-ring {
        animation-duration: 1.8s;
    }
}
