:root {
    --paper: #fbfaf5;
    --ink: #232323;
    --line: #4b4b4b;
    --gold-2: #f2a72d;
    --gold-3: #dc8e13;
    --white: #ffffff;
    --shadow: 0 16px 48px rgba(87, 57, 12, 0.14);
    --danger: #c95045;
    --success: #2f7a47;
    --sky-1: #e7f4ff;
    --sky-2: #cfeaff;
    --sky-3: #f9fcff;
    --sky-4: #a7d8fb;
    --sky-5: #58b3ef;
    --sky-6: #348ad8;
    --sky-shadow: 0 22px 58px rgba(56, 117, 173, 0.2);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

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

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

img {
    max-width: 100%;
}

.landing-body {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top center, rgba(167, 216, 251, 0.94), transparent 34%),
        radial-gradient(circle at 14% 18%, rgba(204, 234, 255, 0.98), transparent 24%),
        radial-gradient(circle at 86% 16%, rgba(178, 224, 255, 0.9), transparent 22%),
        linear-gradient(180deg, #e4f3ff 0%, #f4faff 42%, #eaf5ff 100%);
}

.landing-body::before,
.landing-body::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
    filter: blur(6px);
}

.landing-body::before {
    inset: auto auto -140px -120px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(167, 216, 251, 0.72) 0%, rgba(167, 216, 251, 0) 72%);
}

.landing-body::after {
    inset: 78px -90px auto auto;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(143, 206, 247, 0.56) 0%, rgba(143, 206, 247, 0) 72%);
}

.admin-body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top center, rgba(163, 214, 251, 0.92), transparent 34%),
        radial-gradient(circle at 12% 20%, rgba(208, 236, 255, 0.95), transparent 24%),
        radial-gradient(circle at 86% 14%, rgba(184, 226, 255, 0.88), transparent 22%),
        linear-gradient(180deg, #e3f2ff 0%, #f4f9ff 44%, #ecf6ff 100%);
}

.admin-body::before,
.admin-body::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
    filter: blur(8px);
}

.admin-body::before {
    inset: auto auto -160px -140px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(148, 208, 247, 0.58) 0%, rgba(148, 208, 247, 0) 72%);
}

.admin-body::after {
    inset: 90px -120px auto auto;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(126, 196, 242, 0.42) 0%, rgba(126, 196, 242, 0) 72%);
}

.result-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(255, 201, 99, 0.26), transparent 42%),
        linear-gradient(180deg, #efe8da 0%, #efe8da 28%, #f7f3ea 100%);
}

.landing-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 40px;
    position: relative;
    z-index: 1;
}

.landing-shell--narrow {
    width: min(720px, calc(100% - 32px));
}

.landing-shell--compact {
    width: min(460px, calc(100% - 24px));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

.panel {
    border: 1px solid rgba(75, 75, 75, 0.16);
    border-radius: 28px;
    background: rgba(255, 253, 247, 0.96);
    box-shadow: var(--shadow);
    padding: 24px;
}

.query-entry-panel {
    width: 100%;
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    border-color: rgba(113, 171, 214, 0.2);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 252, 255, 0.9)),
        rgba(255, 255, 255, 0.9);
    box-shadow: var(--sky-shadow);
    backdrop-filter: blur(12px);
}

.query-entry-panel::before {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(105, 189, 241, 0.34) 0%, rgba(105, 189, 241, 0) 72%);
    pointer-events: none;
}

.login-shell {
    width: min(500px, calc(100% - 24px));
}

.login-panel {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 34px 30px 30px;
    border-color: rgba(113, 171, 214, 0.2);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 250, 255, 0.92)),
        rgba(255, 255, 255, 0.92);
    box-shadow: var(--sky-shadow);
    backdrop-filter: blur(14px);
}

.login-panel::before,
.login-panel::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-panel::before {
    top: -68px;
    right: -42px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(111, 194, 243, 0.22) 0%, rgba(111, 194, 243, 0) 72%);
}

.login-panel::after {
    left: -56px;
    bottom: -72px;
    width: 170px;
    height: 170px;
    background: radial-gradient(circle, rgba(152, 213, 248, 0.18) 0%, rgba(152, 213, 248, 0) 72%);
}

.login-panel .hero-kicker {
    margin: 0 auto 14px;
    display: table;
    background: rgba(88, 179, 239, 0.14);
    color: #3177b4;
}

.login-panel h1 {
    margin-bottom: 22px;
    color: #1f4568;
    letter-spacing: 0.03em;
}

.login-panel .stack-form {
    position: relative;
    z-index: 1;
}

.query-entry-title,
.panel h1,
.admin-header h1 {
    margin: 0 0 24px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.12;
    text-align: center;
}

.landing-body .query-entry-title {
    color: #1f4568;
    letter-spacing: 0.04em;
}

.hero-kicker {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(242, 167, 45, 0.14);
    color: #9c6510;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel p,
.admin-header p,
.not-found-panel p {
    margin: 0;
    color: #665e4e;
    line-height: 1.75;
}

.panel-header {
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.panel-header--split {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.stack-form,
.record-form {
    display: grid;
    gap: 16px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field span {
    font-size: 0.95rem;
    font-weight: 700;
}

.landing-body .form-field span {
    color: #44617d;
}

.form-field input,
.inline-search input {
    width: 100%;
    height: 50px;
    border: 1px solid rgba(75, 75, 75, 0.18);
    border-radius: 16px;
    padding: 0 16px;
    font: inherit;
    background: rgba(255, 255, 255, 0.92);
}

.form-field input:focus,
.inline-search input:focus {
    outline: 2px solid rgba(242, 167, 45, 0.32);
    border-color: rgba(242, 167, 45, 0.7);
}

.landing-body .form-field input {
    border-color: rgba(84, 164, 219, 0.28);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.landing-body .form-field input:focus {
    outline: 2px solid rgba(93, 176, 235, 0.32);
    border-color: rgba(52, 138, 216, 0.64);
    background: #ffffff;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--full {
    width: 100%;
}

.button--primary {
    background: linear-gradient(135deg, var(--gold-2), var(--gold-3));
    color: var(--white);
    box-shadow: 0 12px 28px rgba(220, 142, 19, 0.25);
}

.landing-body .button--primary {
    background: linear-gradient(135deg, #64b9f1, var(--sky-6) 60%, #2f7dca 100%);
    box-shadow: 0 14px 32px rgba(52, 138, 216, 0.3);
}

.button--secondary {
    background: #2d2d2d;
    color: var(--white);
}

.button--ghost {
    background: rgba(255, 255, 255, 0.74);
    color: var(--ink);
    border: 1px solid rgba(75, 75, 75, 0.14);
}

.login-panel .button--ghost {
    background: rgba(255, 255, 255, 0.78);
    color: #3d5f7e;
    border: 1px solid rgba(107, 176, 225, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.login-panel .button--ghost:hover {
    box-shadow: 0 12px 24px rgba(83, 150, 201, 0.14);
}

.button--danger {
    background: rgba(201, 80, 69, 0.12);
    color: var(--danger);
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    line-height: 1.6;
}

.alert--error {
    background: rgba(201, 80, 69, 0.1);
    color: #8e3028;
}

.alert--success {
    background: rgba(47, 122, 71, 0.1);
    color: #215634;
}

.inline-actions,
.admin-header__actions,
.record-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.not-found-panel {
    text-align: center;
}

.not-found-panel p {
    margin: 0 auto 20px;
    max-width: 560px;
}

.admin-shell {
    width: min(1280px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 36px;
    position: relative;
    z-index: 1;
}

.admin-shell--narrow {
    width: min(920px, calc(100% - 28px));
}

.admin-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    padding: 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(132, 205, 248, 0.24), transparent 34%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 255, 0.94));
    border: 1px solid rgba(109, 173, 220, 0.18);
    box-shadow: var(--sky-shadow);
}

.admin-body .hero-kicker {
    background: rgba(88, 179, 239, 0.14);
    color: #3177b4;
}

.admin-body .admin-header h1,
.admin-body .panel h1,
.admin-body .panel h2,
.admin-body .empty-state h3 {
    color: #1f4568;
}

.admin-body .admin-header p,
.admin-body .panel p,
.admin-body .hint-list p,
.admin-body .empty-state p {
    color: #57718a;
}

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

.summary-card {
    display: grid;
    gap: 6px;
    padding: 20px 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 248, 255, 0.88));
    border: 1px solid rgba(109, 173, 220, 0.16);
    box-shadow: 0 18px 34px rgba(71, 132, 183, 0.14);
}

.summary-card strong {
    font-size: 1.8rem;
    color: #1f4568;
}

.summary-card span {
    color: #5b7390;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 360px);
    gap: 18px;
    align-items: start;
}

.admin-main-panel,
.admin-side {
    min-width: 0;
}

.admin-side {
    display: grid;
    gap: 18px;
}

.inline-search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-search input {
    min-width: 240px;
}

.admin-body .panel {
    border-color: rgba(109, 173, 220, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 250, 255, 0.9));
    box-shadow: 0 20px 40px rgba(70, 129, 177, 0.12);
}

.admin-body .panel-header h2 {
    margin-bottom: 8px;
}

.admin-body .form-field input,
.admin-body .inline-search input {
    border-color: rgba(84, 164, 219, 0.24);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.admin-body .form-field span {
    color: #46627e;
}

.admin-body .form-field input:focus,
.admin-body .inline-search input:focus {
    outline: 2px solid rgba(93, 176, 235, 0.28);
    border-color: rgba(52, 138, 216, 0.62);
    background: #ffffff;
}

.admin-body .button--primary {
    background: linear-gradient(135deg, #64b9f1, var(--sky-6) 60%, #2f7dca 100%);
    box-shadow: 0 14px 32px rgba(52, 138, 216, 0.28);
}

.admin-body .button--ghost {
    background: rgba(255, 255, 255, 0.78);
    color: #3d5f7e;
    border: 1px solid rgba(107, 176, 225, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.admin-body .button--secondary {
    background: linear-gradient(135deg, #3d6488, #274b6b);
    color: var(--white);
    box-shadow: 0 12px 26px rgba(39, 75, 107, 0.22);
}

.record-list {
    display: grid;
    gap: 16px;
}

.record-card {
    border: 1px solid rgba(109, 173, 220, 0.14);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 249, 255, 0.86));
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(73, 135, 184, 0.1);
}

.record-summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
}

.record-summary::-webkit-details-marker {
    display: none;
}

.record-summary__primary {
    display: grid;
    gap: 4px;
}

.record-summary__primary strong {
    font-size: 1.2rem;
    color: #234a70;
}

.record-summary__primary span {
    color: #5d7490;
}

.record-summary__secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.record-summary__secondary span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(231, 244, 255, 0.92);
    color: #45688b;
    font-size: 0.88rem;
}

.record-summary__indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #46729c;
    font-weight: 700;
}

.record-summary__indicator::after {
    content: "v";
    transition: transform 0.2s ease;
}

.record-card[open] .record-summary__indicator::after {
    transform: rotate(180deg);
}

.record-card__body {
    padding: 0 18px 18px;
    border-top: 1px solid rgba(109, 173, 220, 0.12);
}

.record-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.record-meta div {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(237, 246, 255, 0.94);
}

.record-meta dt {
    margin-bottom: 6px;
    color: #6783a0;
    font-size: 0.88rem;
}

.record-meta dd {
    margin: 0;
    font-weight: 700;
    line-height: 1.5;
    color: #234a70;
}

.hint-list p,
.empty-state p {
    margin: 0 0 10px;
    line-height: 1.7;
}

.empty-state {
    padding: 24px 0 8px;
}

.empty-state h3 {
    margin: 0 0 8px;
}

.form-panel {
    padding: 24px;
}

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

.form-field--wide {
    grid-column: span 2;
}

.form-footer {
    grid-column: span 2;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.result-body {
    min-height: 100vh;
    background: #ffffff;
    overflow-x: hidden;
}

.warranty-fit-shell {
    width: 100%;
    padding: 10px 10px 16px;
}

.warranty-fit-box {
    width: min(100%, 1200px);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.warranty-page {
    width: 1200px;
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: top left;
}

.warranty-sheet {
    border: 1.5px solid var(--line);
    background: #ffffff;
    box-shadow: 0 12px 40px rgba(80, 58, 15, 0.12);
}

.warranty-banner-row,
.warranty-subtitle-row,
.warranty-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.warranty-banner-row::after,
.warranty-subtitle-row::after,
.warranty-content-grid::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1.5px;
    background: var(--line);
    transform: translateX(-0.75px);
    pointer-events: none;
}

.warranty-banner-row {
    border-bottom: 1.5px solid var(--line);
}

.warranty-banner-cell,
.warranty-subtitle-cell,
.warranty-promo-brand {
    color: #fffdf7;
    text-align: center;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.warranty-banner-cell {
    background: #2f7dca;
    padding: 8px 12px 7px;
    font-size: 24px;
    letter-spacing: 0.4px;
}

.warranty-subtitle-row {
    border-bottom: 1.5px solid var(--line);
}

.warranty-subtitle-cell {
    background: #7ec1ee;
    padding: 8px 12px;
    font-size: 24px;
}

.warranty-promo-brand {
    background: #2f7dca;
}

.warranty-content-grid {
    min-height: 0;
}

.warranty-instructions {
    padding: 16px 18px 14px 18px;
}

.warranty-lead {
    margin: 12px auto 14px;
    max-width: 92%;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.42;
    text-align: center;
}

.warranty-list {
    margin: 0;
    padding-left: 0.92em;
    font-size: 14.5px;
    line-height: 1.2;
}

.warranty-list li {
    margin-bottom: 5px;
}

.warranty-list p {
    margin: 2px 0 0;
}

.warranty-registration {
    display: flex;
    flex-direction: column;
}

.warranty-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.warranty-label-col {
    width: 24%;
}

.warranty-value-col {
    width: 26%;
}

.warranty-table th,
.warranty-table td {
    border-bottom: 1.5px solid var(--line);
    border-left: 1.5px solid var(--line);
    padding: 9px 7px;
    vertical-align: middle;
    text-align: center;
}

.warranty-table tr > :first-child {
    border-left: 0;
}

.warranty-table th {
    font-size: 18px;
    font-weight: 700;
}

.warranty-table td {
    font-size: 15px;
    line-height: 1.25;
}

.warranty-note-box {
    flex: 1 0 auto;
    border-bottom: 1.5px solid var(--line);
    padding: 9px 10px 8px;
    font-size: 12px;
    line-height: 1.35;
}

.warranty-note-box p {
    margin: 0 0 4px;
}

.warranty-promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    min-height: 136px;
}

.warranty-promo-brand {
    display: grid;
    place-content: center;
    gap: 4px;
    font-size: 28px;
    line-height: 1.1;
}

.warranty-promo-shot {
    margin: 0;
    min-height: 136px;
    overflow: hidden;
    border-left: 1.5px solid var(--line);
}

.warranty-promo-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1120px) {
    .admin-grid,
    .record-form {
        grid-template-columns: 1fr;
    }

    .admin-summary,
    .record-meta {
        grid-template-columns: 1fr;
    }

    .form-field--wide,
    .form-footer {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .landing-shell,
    .admin-shell {
        width: calc(100% - 20px);
        padding: 16px 0 24px;
    }

    .landing-shell--compact {
        width: calc(100% - 20px);
        min-height: 100vh;
    }

    .panel,
    .admin-header {
        padding: 20px;
        border-radius: 22px;
    }

    .panel-header--split,
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }

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

    .query-entry-title,
    .panel h1,
    .admin-header h1 {
        font-size: 2rem;
    }

    .inline-search {
        flex-direction: column;
    }

    .inline-search input {
        min-width: 0;
        width: 100%;
    }

    .record-actions,
    .inline-actions,
    .admin-header__actions,
    .form-footer {
        flex-direction: column;
    }

    .record-actions .button,
    .record-actions form,
    .record-actions form .button,
    .inline-actions .button,
    .admin-header__actions .button,
    .form-footer .button {
        width: 100%;
    }

    .warranty-fit-shell {
        min-height: 100vh;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 7vh 6px 12px;
    }

    .warranty-fit-box {
        width: 100%;
        margin: 0 auto;
    }
}
