/* ==========================================================
   陪玩团申诉中心 · H5 + 管理后台样式
   ========================================================== */

:root {
    --bg: #f4f5fb;
    --bg-soft: #eceef8;
    --surface: #ffffff;
    --ink: #161829;
    --ink-2: #545a70;
    --muted: #8b91a6;
    --line: #e9ebf4;
    --line-2: #dfe2ef;
    --primary: #5353f5;
    --primary-2: #8b5cf6;
    --ok: #12b76a;
    --warn: #f79009;
    --info: #3b82f6;
    --danger: #ef4444;
    --r-lg: 20px;
    --r-md: 13px;
    --r-sm: 9px;
    --shadow: 0 12px 32px rgba(31, 35, 88, .08);
    --shadow-sm: 0 4px 16px rgba(31, 35, 88, .06);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body.h5 {
    background:
        radial-gradient(900px 420px at 50% -140px, #e7e4ff 0%, rgba(231, 228, 255, 0) 70%),
        var(--bg);
    min-height: 100vh;
}

body.admin {
    background-color: #eef0f8;
    background-image: url("../img/bg.jpg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

/* 管理端：壁纸全显示，卡片统一 20% 白色底 */
body.admin .card,
body.admin .empty,
body.admin .active-order,
body.admin .notice-ticker,
body.admin .order-search,
body.admin .auth-card,
body.admin .perm-item,
body.admin .notice-item,
body.admin .acct-item,
body.admin .type-item,
body.admin .stat-card,
body.admin .pager-btn,
body.admin .search-box input,
body.admin .tab,
body.admin .order-filter,
body.admin .order-card,
body.admin .all-order-card,
body.admin .ticket-card {
    background: rgba(255, 255, 255, .2);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-color: rgba(255, 255, 255, .45);
}

body.admin .order-card.is-active {
    background: linear-gradient(160deg, rgba(255, 255, 255, .3), rgba(232, 240, 255, .2));
}

body.admin .ticket-card::after {
    display: none;
}

body.admin .tab.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

body.admin .order-filter.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, #ff7a59, #ff4d6d);
}

.shell {
    max-width: 560px;
    margin: 0 auto;
    padding-bottom: env(safe-area-inset-bottom);
}

body.admin .shell {
    max-width: 1040px;
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}

/* ---------------- Flash ---------------- */

.flash {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    max-width: min(88vw, 440px);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 10px 30px rgba(20, 24, 60, .16);
    animation: flashIn .28s ease-out;
    pointer-events: none;
}

.flash-ok {
    background: #ecfdf3;
    color: #0b7a48;
    border: 1px solid #c9f0da;
}

.flash-err {
    background: #fff2f1;
    color: #c0392b;
    border: 1px solid #ffd9d5;
}

@keyframes flashIn {
    from { opacity: 0; transform: translate(-50%, -12px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------------- Hero ---------------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: 22px 20px 24px;
    color: #fff;
    background: linear-gradient(140deg, #4a43e0 0%, #6c4df0 46%, #9a5cf0 100%);
    border-radius: 0 0 26px 26px;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 68%);
}

.orb-a {
    width: 210px;
    height: 210px;
    top: -90px;
    right: -60px;
}

.orb-b {
    width: 150px;
    height: 150px;
    bottom: -70px;
    left: -50px;
    opacity: .7;
}

.brand-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 13px;
    font-size: 18px;
    font-weight: 700;
    color: #5b50e8;
    background: linear-gradient(150deg, #ffffff, #e8e4ff);
    box-shadow: 0 8px 18px rgba(20, 12, 90, .22);
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.settings-preview {
    padding: 6px 0;
}

.settings-preview .brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: 24px;
}

.settings-preview .brand-text strong {
    color: var(--ink);
    font-size: 18px;
}

.settings-preview .brand-text span {
    color: var(--muted);
    opacity: 1;
}

.brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.brand-text strong {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .3px;
}

.brand-text span {
    font-size: 11px;
    opacity: .72;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-entry {
    margin-left: auto;
    flex: none;
    font-size: 11.5px;
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    padding: 5px 11px;
}

.hero-title {
    position: relative;
    margin: 26px 0 10px;
    font-size: 27px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .2px;
}

.hero-title em {
    display: block;
    margin-top: 6px;
    font-style: normal;
    font-size: 18px;
    font-weight: 500;
    opacity: .86;
    letter-spacing: .2px;
}

.hero-sub {
    position: relative;
    margin: 0 0 20px;
    font-size: 12.5px;
    line-height: 1.65;
    opacity: .76;
    max-width: 320px;
}

.hero-actions {
    position: relative;
    display: flex;
    gap: 10px;
}

.hero-actions .btn {
    flex: 1;
}

.hero-stats {
    position: relative;
    display: flex;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .16);
}

.stat {
    flex: 1;
    text-align: center;
}

.stat b {
    display: block;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .5px;
}

.stat span {
    display: block;
    margin-top: 1px;
    font-size: 11px;
    opacity: .68;
}

/* ---------------- Layout ---------------- */

.page {
    padding: 16px 16px 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.admin .admin-page {
    padding: 18px 16px 48px;
}

.foot-note {
    margin: 4px 0 0;
    text-align: center;
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.7;
}

/* ---------------- Buttons ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    -webkit-user-select: none;
    user-select: none;
}

.btn:active {
    transform: scale(.975);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 8px 20px rgba(83, 83, 245, .28);
}

.btn-light {
    color: #4a43e0;
    background: #fff;
    box-shadow: 0 8px 20px rgba(20, 12, 90, .18);
}

.btn-ghost-light {
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .38);
    backdrop-filter: blur(6px);
}

.btn-ghost {
    color: var(--ink-2);
    background: #fff;
    border-color: var(--line-2);
}

.btn-lg {
    height: 50px;
    border-radius: 14px;
    font-size: 16px;
}

.btn-sm {
    height: 34px;
    padding: 0 12px;
    font-size: 12.5px;
    border-radius: 9px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ---------------- Topbar ---------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    height: 54px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.topbar h1 {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.back {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    text-decoration: none;
    flex: none;
}

.back-arrow {
    width: 9px;
    height: 9px;
    border-left: 2px solid var(--ink-2);
    border-bottom: 2px solid var(--ink-2);
    transform: rotate(45deg);
    margin-left: 4px;
}

.topbar-action {
    flex: none;
    min-width: 52px;
    text-align: right;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
}

.topbar-holder {
    flex: none;
    width: 52px;
}

/* ---------------- Cards ---------------- */

.card {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 18px 16px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: .2px;
}

.card-title::before {
    content: "";
    width: 3px;
    height: 15px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
}

.card-sub {
    margin: -4px 0 14px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.65;
}

/* ---------------- Alerts ---------------- */

.alert {
    border-radius: 12px;
    padding: 11px 13px;
    font-size: 12.5px;
    line-height: 1.65;
}

.alert-err {
    background: #fff2f1;
    color: #c0392b;
    border: 1px solid #ffd9d5;
}

.alert-ok {
    background: #ecfdf3;
    color: #0b7a48;
    border: 1px solid #c9f0da;
}

.alert-warn {
    background: #fff8e8;
    color: #9c5a00;
    border: 1px solid #ffe3b5;
}

/* ---------------- Rules / FAQ ---------------- */

.rules {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 15px;
}

.rules li {
    display: flex;
    gap: 12px;
}

.rules i {
    flex: none;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-style: normal;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    background: #eeefff;
}

.rules strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.rules p {
    margin: 3px 0 0;
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--muted);
}

.faq {
    margin-top: -2px;
}

.faq-item {
    border-top: 1px solid var(--line);
    padding: 12px 0 2px;
}

.faq-item:first-child {
    border-top: none;
    padding-top: 2px;
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--ink-2);
    padding: 4px 0 10px;
}

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

.faq-plus {
    flex: none;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f2f3fb;
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
    transition: transform .2s ease;
}

.faq-plus::before {
    content: "+";
}

.faq-item[open] .faq-plus {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-item[open] .faq-plus::before {
    content: "−";
}

.faq-item p {
    margin: 0 0 12px;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--muted);
}

/* ---------------- Form ---------------- */

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field {
    margin-bottom: 16px;
}

.field:last-child {
    margin-bottom: 0;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--ink-2);
}

.optional {
    display: inline-block;
    margin-left: 3px;
    padding: 1px 6px;
    border-radius: 6px;
    background: #f1f2f9;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 400;
    vertical-align: 2px;
}

.control {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    background: #f8f9fe;
    color: var(--ink);
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.5;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.control::placeholder {
    color: #b5bacb;
}

.control:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(83, 83, 245, .12);
}

.control.is-err {
    border-color: #f5b5b5;
    background: #fff8f8;
}

select.control {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238b91a6' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

textarea.control {
    resize: vertical;
    min-height: 72px;
}

.field-err {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--danger);
    line-height: 1.5;
}

.field-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}

.hint {
    margin: 6px 0 0;
    font-size: 11.5px;
    color: var(--muted);
    line-height: 1.6;
}

.counter {
    font-size: 11.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* ---------------- Chips ---------------- */

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

.chip {
    position: relative;
    display: block;
    padding: 10px 8px;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    background: #f8f9fe;
    text-align: center;
    font-size: 12.5px;
    color: var(--ink-2);
    cursor: pointer;
    user-select: none;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

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

.chip:has(input:checked) {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eeefff, #f7f2ff);
    color: var(--primary);
    font-weight: 600;
}

.chip:has(input:focus-visible) {
    box-shadow: 0 0 0 3px rgba(83, 83, 245, .14);
}

/* ---------------- Uploader ---------------- */

.uploader {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.upload-tile {
    width: 86px;
    height: 86px;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px dashed #c8cbe2;
    border-radius: 12px;
    background: #fafbff;
    color: var(--muted);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.upload-tile:hover {
    border-color: var(--primary);
    background: #f5f4ff;
}

.upload-plus {
    position: relative;
    width: 18px;
    height: 18px;
}

.upload-plus::before,
.upload-plus::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: #9aa0c4;
    border-radius: 2px;
}

.upload-plus::before {
    width: 16px;
    height: 1.5px;
    transform: translate(-50%, -50%);
}

.upload-plus::after {
    width: 1.5px;
    height: 16px;
    transform: translate(-50%, -50%);
}

.upload-text {
    font-size: 11.5px;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.upload-thumb {
    position: relative;
    width: 86px;
    height: 86px;
    border-radius: 12px;
    overflow: hidden;
    background: #f0f1f8;
    box-shadow: var(--shadow-sm);
}

.upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb-del {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(18, 20, 38, .62);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

/* ---------------- Checkbox ---------------- */

.checkline {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 2px 4px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--ink-2);
    cursor: pointer;
}

.checkline input {
    flex: none;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--primary);
}

.form-tip {
    margin: -4px 0 0;
    text-align: center;
    font-size: 11.5px;
    color: var(--muted);
}

/* ---------------- Search & results ---------------- */

.search-form {
    margin-bottom: 4px;
}

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

.search-box input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 13px;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    background: #f8f9fe;
    color: var(--ink);
    font-family: inherit;
    font-size: 14.5px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.search-box input::placeholder {
    color: #b5bacb;
}

.search-box input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(83, 83, 245, .12);
}

.search-box .btn {
    flex: none;
    height: 46px;
}

.result-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 6px 2px 2px;
}

.result-head h2 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
}

.result-head span {
    font-size: 12px;
    color: var(--muted);
}

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

.result-card {
    display: block;
    padding: 14px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, transform .15s ease;
}

.result-card:hover {
    border-color: #d8d8ff;
    transform: translateY(-1px);
}

.result-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ticket-no {
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .3px;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    word-break: break-all;
}

.badge {
    flex: none;
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}

.st-pending {
    background: #fff4e5;
    color: #b26a00;
}

.st-processing {
    background: #eef2ff;
    color: #3b4bd6;
}

.st-resolved {
    background: #e8f9f0;
    color: #0f7a4d;
}

.st-rejected {
    background: #feecec;
    color: #bf3b3b;
}

.result-meta {
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--muted);
}

.result-arrow {
    color: var(--primary);
}

.tip-card h3 {
    margin: 0 0 10px;
    font-size: 14.5px;
    font-weight: 600;
}

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

.tip-list li {
    position: relative;
    padding-left: 15px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--muted);
}

.tip-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

/* ---------------- Empty ---------------- */

.empty {
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 34px 22px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.empty-icon {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(150deg, #eef0ff, #f8f4ff);
}

.empty-icon::before {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    left: 22px;
    top: 20px;
    border: 2px solid #a3a9de;
    border-radius: 50%;
}

.empty-icon::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 2px;
    left: 38px;
    top: 39px;
    background: #a3a9de;
    border-radius: 2px;
    transform: rotate(45deg);
    transform-origin: left center;
}

.empty h3 {
    margin: 16px 0 6px;
    font-size: 15.5px;
    font-weight: 600;
}

.empty p {
    margin: 0 auto;
    max-width: 290px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--muted);
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

/* ---------------- Ticket / stepper ---------------- */

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

.ticket-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-label {
    display: block;
    font-size: 11.5px;
    letter-spacing: .6px;
    color: var(--muted);
}

.ticket-number {
    display: block;
    margin-top: 3px;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .6px;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.copy-btn {
    flex: none;
    padding: 6px 11px;
    border: 1px solid var(--line-2);
    border-radius: 8px;
    background: #f4f5fc;
    color: var(--primary);
    font-family: inherit;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
}

.copy-btn:active {
    background: #eceeff;
}

.ticket-status {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
}

.ticket-time {
    font-size: 11.5px;
    color: var(--muted);
}

.stepper {
    display: flex;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
}

.step {
    position: relative;
    flex: 1;
    text-align: center;
}

.step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 11px;
    left: 50%;
    width: 100%;
    height: 1px;
    background: #e3e5f0;
}

.step.step-done:not(:last-child)::after {
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.step-dot {
    position: relative;
    z-index: 1;
    width: 23px;
    height: 23px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f1f2f8;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
}

.step-done .step-dot {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 4px 12px rgba(83, 83, 245, .28);
}

.step-active .step-dot {
    background: rgba(83, 83, 245, .13);
    color: var(--primary);
    box-shadow: 0 0 0 3px rgba(83, 83, 245, .1);
}

.step-rejected .step-dot {
    background: #feecec;
    color: var(--danger);
}

.step-label {
    display: block;
    margin-top: 7px;
    font-size: 11.5px;
    color: var(--muted);
}

.step-done .step-label,
.step-active .step-label {
    color: var(--ink-2);
}

.step-rejected .step-label {
    color: var(--danger);
}

/* ---------------- Detail content ---------------- */

.info-list {
    display: grid;
}

.info-list > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f2f3fa;
}

.info-list > div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-list > div:first-child {
    padding-top: 0;
}

.info-list span {
    flex: none;
    font-size: 12.5px;
    color: var(--muted);
}

.info-list b {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    text-align: right;
    word-break: break-all;
}

.copyable {
    color: var(--primary) !important;
    cursor: pointer;
    border-bottom: 1px dashed rgba(83, 83, 245, .4);
}

/* ---------------- 处理信息 ---------------- */

.handler-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.handler-avatar {
    width: 42px;
    height: 42px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(150deg, #5aa9f7, #2f7fe8);
    box-shadow: 0 4px 10px rgba(47, 140, 245, .28);
}

.handler-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.handler-text strong {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ink);
}

.handler-text span {
    font-size: 12px;
    color: var(--muted);
}

.tl-by {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

.desc-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--ink-2);
    word-break: break-word;
}

.expect-box {
    margin-top: 14px;
    padding: 12px 13px;
    border-radius: 12px;
    background: #f7f8fe;
}

.expect-box span {
    font-size: 11.5px;
    color: var(--muted);
}

.expect-box p {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ink-2);
    word-break: break-word;
}

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

.image-item {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #f2f3fa;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---------------- Timeline ---------------- */

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

.tl-item {
    position: relative;
    padding-left: 22px;
    padding-bottom: 18px;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-item::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 14px;
    bottom: 0;
    width: 1px;
    background: #e7e9f3;
}

.tl-item:last-child::before {
    display: none;
}

.tl-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c7cbe0;
}

.tl-create .tl-dot {
    background: var(--primary);
}

.tl-status .tl-dot {
    background: var(--info);
}

.tl-reply .tl-dot {
    background: var(--ok);
}

.tl-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.tl-head strong {
    font-size: 13px;
    font-weight: 600;
}

.tl-time {
    flex: none;
    font-size: 11px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.tl-body p {
    margin: 4px 0 0;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--ink-2);
    word-break: break-word;
}

.tl-reply .tl-body {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f7f8fe;
}

/* ---------------- Admin ---------------- */

.admin-top {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-brand .brand-mark {
    width: 38px;
    height: 38px;
    font-size: 16px;
    color: #fff;
    background: linear-gradient(140deg, var(--primary), var(--primary-2));
    box-shadow: 0 6px 16px rgba(83, 83, 245, .28);
}

.admin-brand div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-brand strong {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.admin-brand span {
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

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

.tabs {
    display: flex;
    gap: 8px;
    margin: 2px 0 14px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    flex: none;
    padding: 7px 13px;
    border: 1px solid var(--line-2);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-2);
    font-size: 12.5px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.tab em {
    margin-left: 4px;
    font-style: normal;
    font-size: 11px;
    color: var(--muted);
}

.tab.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    box-shadow: 0 6px 16px rgba(83, 83, 245, .24);
}

.tab.is-active em {
    color: rgba(255, 255, 255, .8);
}

.filter-bar {
    margin: 0 0 14px;
}

.ticket-list {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

@media (min-width: 760px) {
    .ticket-list {
        grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    }
}

.ticket-card {
    position: relative;
    display: block;
    padding: 15px 16px 14px;
    border: 1px solid #cfe8fb;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background:
        radial-gradient(120% 90% at 90% -10%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 62%),
        linear-gradient(160deg, #f0f9ff 0%, #ddf1fe 52%, #cbe7fd 100%);
    box-shadow: 0 8px 20px rgba(38, 122, 199, .1);
    transition: transform .15s ease, box-shadow .15s ease;
}

.ticket-card::after {
    content: "";
    position: absolute;
    left: -25%;
    right: -25%;
    bottom: -70%;
    height: 130%;
    pointer-events: none;
    background:
        radial-gradient(58% 58% at 22% 62%, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, 0) 72%),
        radial-gradient(52% 52% at 82% 46%, rgba(150, 208, 250, .55) 0%, rgba(255, 255, 255, 0) 72%);
}

.ticket-card > * {
    position: relative;
    z-index: 1;
}

.ticket-card-main {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ticket-claim {
    margin: 0;
}

.ticket-action.is-disabled {
    background: linear-gradient(135deg, #c9d6e6, #b3c4d8);
    box-shadow: none;
    cursor: not-allowed;
}

.ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(38, 122, 199, .16);
}

.ticket-card-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.ticket-card-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: #14243a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-card-time {
    flex: none;
    font-size: 11.5px;
    color: #7d94ab;
    font-variant-numeric: tabular-nums;
}

.ticket-card-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.chip-dark {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 5px;
    background: #1d2430;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.65;
    white-space: nowrap;
}

.ticket-card-note {
    font-size: 12px;
    color: #6b7f93;
}

.ticket-card-link {
    color: #2f8cf5;
    font-weight: 600;
}

.ticket-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.ticket-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(150deg, #5aa9f7, #2f7fe8);
    box-shadow: 0 4px 10px rgba(47, 140, 245, .3);
}

.ticket-avatar-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #e8f5ff;
}

.ticket-user-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ticket-user-text strong {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 700;
    color: #16283c;
}

.ticket-verified {
    flex: none;
    color: #2f8cf5;
}

.ticket-user-text span {
    font-size: 11.5px;
    color: #7d94ab;
    word-break: break-all;
}

.ticket-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.ticket-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, .88);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.ticket-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.ticket-status.st-pending {
    color: #b26a00;
    border-color: #f0d6a8;
}

.ticket-status.st-processing {
    color: #3b4bd6;
    border-color: #c8d0f8;
}

.ticket-status.st-resolved {
    color: #0f7a4d;
    border-color: #a8e4c6;
}

.ticket-status.st-rejected {
    color: #bf3b3b;
    border-color: #f5c2c2;
}

.ticket-action {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    height: 38px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    background: linear-gradient(135deg, #37a1ff, #1a6fe8);
    box-shadow: 0 6px 14px rgba(31, 124, 232, .32);
    cursor: pointer;
}

/* ---------------- 进行中提示 ---------------- */

.active-order {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, #eef4ff, #e6efff);
    border: 1px solid #cfdcff;
    box-shadow: var(--shadow-sm);
}

.active-order-label {
    flex: none;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.active-order-text {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    color: var(--ink-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.active-order-go {
    flex: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

/* ---------------- 订单页 ---------------- */

.order-page {
    padding-left: 12px;
    padding-right: 12px;
}

.order-layout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.order-side {
    position: sticky;
    top: 12px;
    flex: none;
    width: 76px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.order-filter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 9px 4px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 3px 10px rgba(31, 35, 88, .05);
    font-size: 12.5px;
    color: var(--ink-2);
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.order-filter em {
    font-style: normal;
    font-size: 11px;
    color: var(--muted);
}

.order-filter.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #ff7a59, #ff4d6d);
    box-shadow: 0 6px 14px rgba(255, 89, 105, .32);
}

.order-filter.is-active em {
    color: rgba(255, 255, 255, .82);
}

.order-main {
    flex: 1;
    min-width: 0;
}

.order-search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.order-search-icon {
    flex: none;
    display: grid;
    place-items: center;
    color: var(--muted);
}

.order-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--ink);
}

.order-search input::placeholder {
    color: #a8afc2;
}

.order-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 12px 2px 10px;
    font-size: 12.5px;
    color: var(--ink-2);
}

.order-summary-tip {
    font-size: 11.5px;
    color: var(--muted);
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-card {
    display: block;
    border-radius: 14px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--line);
    box-shadow: 0 5px 16px rgba(31, 35, 88, .07);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}

.order-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(31, 35, 88, .1);
}

.order-card.is-active {
    border-color: #cfd9ff;
    background: linear-gradient(160deg, #ffffff, #f3f6ff);
}

.order-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    font-size: 12px;
    color: var(--muted);
    border-bottom: 1px dashed var(--line-2);
}

.order-state {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
}

.order-state.st-pending { color: #b26a00; }
.order-state.st-processing { color: #3b4bd6; }
.order-state.st-resolved { color: #0f7a4d; }
.order-state.st-rejected { color: #bf3b3b; }

.order-card-body {
    padding: 12px 14px 14px;
}

.order-card-body strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.order-no {
    min-width: 0;
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-end {
    margin: 16px 0 4px;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
}

.handler-claim {
    margin-left: auto;
    flex: none;
}

.handler-tip {
    margin-left: auto;
    flex: none;
    font-size: 11.5px;
    color: #bf3b3b;
}

/* ---------------- 订单查看（全部订单） ---------------- */

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

.all-order-card {
    display: block;
    padding: 13px 14px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}

.all-order-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(31, 35, 88, .1);
}

.all-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.all-order-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    flex-wrap: wrap;
}

.all-order-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 7px;
    font-size: 11.5px;
    color: var(--muted);
}

.all-order-result {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    background: #f7f8fd;
}

.all-order-result > span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 2px;
}

.all-order-result p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
}

.pager-btn {
    padding: 8px 14px;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    background: #fff;
    color: var(--ink-2);
    font-size: 12.5px;
    text-decoration: none;
}

.pager-btn.is-disabled {
    opacity: .4;
    pointer-events: none;
}

.pager-info {
    font-size: 12.5px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.admin-time {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 12px;
    font-size: 11.5px;
    color: var(--muted);
}

/* ---------------- Auth ---------------- */

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 18px;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    padding: 30px 24px 26px;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: center;
}

.auth-mark {
    margin: 0 auto 14px;
    color: #fff;
    background: linear-gradient(140deg, var(--primary), var(--primary-2));
    box-shadow: 0 8px 20px rgba(83, 83, 245, .3);
}

.auth-card h1 {
    margin: 0 0 5px;
    font-size: 20px;
    font-weight: 600;
}

.auth-sub {
    margin: 0 0 22px;
    font-size: 12.5px;
    color: var(--muted);
}

.auth-card .field {
    text-align: left;
}

.auth-card .alert {
    margin-bottom: 16px;
    text-align: left;
}

.auth-back {
    display: inline-block;
    margin-top: 18px;
    font-size: 12.5px;
    color: var(--muted);
    text-decoration: none;
}

/* ---------------- Accounts ---------------- */

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

.acct-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fafbff;
}

.acct-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.acct-avatar {
    flex: none;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(140deg, var(--primary), var(--primary-2));
    overflow: hidden;
}

.acct-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.acct-main {
    flex: 1;
    min-width: 0;
}

.acct-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    word-break: break-all;
}

.role-badge {
    padding: 1px 7px;
    border-radius: 6px;
    background: #eef0ff;
    color: var(--primary);
    font-size: 10.5px;
    font-weight: 500;
}

.role-super {
    background: #fff3e0;
    color: #b26a00;
}

.acct-state {
    padding: 1px 7px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 500;
}

.acct-state.is-on {
    background: #e8f9f0;
    color: #0f7a4d;
}

.acct-state.is-off {
    background: #feecec;
    color: #bf3b3b;
}

.acct-meta {
    margin-top: 4px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--muted);
}

.acct-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
}

.acct-reset {
    position: relative;
}

.acct-reset summary {
    display: flex;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line-2);
    border-radius: 9px;
    background: #fff;
    color: var(--ink-2);
    font-size: 12.5px;
    list-style: none;
    cursor: pointer;
}

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

.acct-reset[open] {
    flex-basis: 100%;
}

.acct-reset[open] summary {
    display: none;
}

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

.reset-form .control {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 13px;
}

.reset-form .btn {
    flex: none;
    height: 38px;
}

.btn-danger-ghost {
    color: #bf3b3b;
    background: #fff;
    border-color: #ffd9d5;
}

.btn-danger-ghost:hover {
    background: #fff6f5;
}

.btn-ok {
    color: #fff;
    background: linear-gradient(135deg, #22c55e, #12a052);
    box-shadow: 0 8px 20px rgba(18, 160, 82, .26);
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #f87171, #e23c3c);
    box-shadow: 0 8px 20px rgba(226, 60, 60, .24);
}

.result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.hint-center {
    margin-top: 8px;
    text-align: center;
}

.acct-empty {
    margin: 0;
    padding: 12px 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}

/* ---------------- Admin bottom tabs ---------------- */

body.admin.has-tabs {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
}

.admin-tabs {
    position: fixed;
    left: 50%;
    bottom: calc(14px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 40;
    width: min(calc(100% - 32px), 340px);
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    background: rgba(255, 255, 255, .58);
    box-shadow: 0 14px 34px rgba(31, 35, 88, .16), inset 0 1px 0 rgba(255, 255, 255, .85);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
}

.admin-tabs.is-single {
    width: min(calc(100% - 32px), 200px);
}

.admin-tabs-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    height: 46px;
}

.admin-tab {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 46px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.admin-tab.is-active {
    color: var(--primary);
    background: rgba(83, 83, 245, .13);
}

.tab-icon {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
}

.tab-icon svg {
    width: 18px;
    height: 18px;
}

/* ---------------- Profile ---------------- */

.profile-card {
    padding: 20px 16px;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar {
    flex: none;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(140deg, var(--primary), var(--primary-2));
    box-shadow: 0 10px 22px rgba(83, 83, 245, .28);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-info {
    min-width: 0;
}

.profile-info h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: .2px;
    word-break: break-all;
}

.profile-info p {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 5px 0 0;
}

.profile-tip {
    font-size: 12px;
    color: var(--muted);
}

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

.tool-form {
    display: contents;
}

.tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 4px 2px;
    border: 0;
    border-radius: 13px;
    background: none;
    color: var(--ink);
    font-family: inherit;
    font-size: 12.5px;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.tool-item:hover {
    background: #f6f7fd;
    color: var(--primary);
}

.tool-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #f3f4fb;
    color: #34374b;
    transition: background .18s ease, color .18s ease;
}

.tool-item:hover .tool-icon {
    background: #eceefe;
    color: var(--primary);
}

.tool-icon svg {
    width: 24px;
    height: 24px;
}

.tool-label {
    white-space: nowrap;
}

/* ---------------- Issue types ---------------- */

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

.type-item {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fafbff;
}

.type-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.type-count {
    padding: 1px 7px;
    border-radius: 6px;
    background: #f0f1f8;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.type-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed var(--line);
}

.type-edit summary {
    display: flex;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line-2);
    border-radius: 9px;
    background: #fff;
    color: var(--ink-2);
    font-size: 12.5px;
    list-style: none;
    cursor: pointer;
}

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

.type-edit[open] {
    flex-basis: 100%;
}

.type-edit[open] summary {
    display: none;
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* ---------------- Permissions ---------------- */

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

.perm-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fafbff;
    color: var(--ink-2);
    font-size: 13px;
    cursor: pointer;
}

.perm-item input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.perm-item input:checked + span {
    color: var(--primary);
    font-weight: 600;
}

/* ---------------- Statistics ---------------- */

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

.stat-card {
    padding: 14px 14px 12px;
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.stat-card b {
    display: block;
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: .3px;
}

.stat-card b.is-total,
.stat-card b.is-rate {
    color: var(--primary);
}

.stat-card b.is-pending {
    color: var(--warn);
}

.stat-card b.is-processing {
    color: var(--info);
}

.stat-card b.is-resolved {
    color: var(--ok);
}

.stat-card b.is-rejected {
    color: var(--danger);
}

.stat-card span {
    display: block;
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--muted);
}

.trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    min-height: 96px;
    padding: 6px 2px 0;
}

.trend-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.trend-value {
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    color: var(--ink-2);
}

.trend-bar {
    width: 100%;
    max-width: 26px;
    border-radius: 6px;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
    opacity: .9;
}

.trend-label {
    font-size: 10px;
    color: var(--muted);
    white-space: nowrap;
}

.dist-list {
    display: grid;
    gap: 12px;
}

.dist-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
    font-size: 12.5px;
    color: var(--ink-2);
}

.dist-head b {
    font-weight: 600;
    color: var(--ink);
}

.dist-track {
    height: 8px;
    border-radius: 999px;
    background: #f0f1f8;
    overflow: hidden;
}

.dist-bar {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.dist-bar.bar-pending {
    background: linear-gradient(90deg, #f79009, #fbbf24);
}

.dist-bar.bar-processing {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.dist-bar.bar-resolved {
    background: linear-gradient(90deg, #12b76a, #34d399);
}

.dist-bar.bar-rejected {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.stats-empty {
    margin: 4px 0;
    padding: 12px 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
}

/* ---------------- Responsive ---------------- */

@media (min-width: 640px) {
    body.h5 .shell {
        padding-top: 18px;
    }

    .hero {
        border-radius: 26px;
    }

    .topbar {
        border-radius: 0 0 16px 16px;
    }

    .page {
        padding: 20px 18px 48px;
    }
}

@media (min-width: 900px) {
    body.admin .admin-page {
        padding: 24px 24px 56px;
    }

    .admin-top {
        padding: 14px 24px;
    }
}

/* ---------------- 公告 ---------------- */

.back-row {
    display: flex;
    gap: 8px;
}

.notice-ticker {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.notice-ticker-label {
    flex: none;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    padding: 3px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.notice-ticker-view {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.notice-ticker-track {
    display: inline-block;
    white-space: nowrap;
    font-size: 13px;
    color: var(--ink-2);
}

.notice-ticker.is-scrolling .notice-ticker-track {
    animation: noticeScroll linear infinite;
}

@keyframes noticeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

.notice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notice-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fbfbfe;
}

.notice-item-body {
    font-size: 13.5px;
    color: var(--ink);
    line-height: 1.65;
}

.notice-item-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11.5px;
    color: var(--muted);
}

.notice-modal {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.notice-modal[hidden] {
    display: none;
}

.notice-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(18, 20, 40, .45);
}

.notice-modal-card {
    position: relative;
    width: min(100%, 380px);
    padding: 18px 18px 16px;
    background: var(--surface);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(20, 24, 60, .24);
    animation: noticeModalIn .22s ease-out;
}

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

.notice-modal-head strong {
    font-size: 16px;
}

.notice-close {
    border: 0;
    background: transparent;
    padding: 2px 6px;
    font-size: 20px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}

.notice-modal-body {
    margin-bottom: 16px;
    max-height: 50vh;
    overflow: auto;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ink-2);
}

@keyframes noticeModalIn {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

/* ---------------- 我的 · 支持与宣传 ---------------- */

.support-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 10px 0 8px;
}

.support-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 10px;
    background: #fdf5e1;
    border: 1px solid #f1e2b8;
    font-size: 12.5px;
    font-weight: 700;
    color: #3b3121;
}

.support-badge svg {
    color: #d8a92a;
}

.promo-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: min(100%, 340px);
    padding: 14px 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, #3a6ef0 0%, #6a3ff0 55%, #d63ab3 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 10px 24px rgba(74, 79, 240, .28);
}
