* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --accent: #667eea;
    --accent2: #764ba2;
    --bg: #f0f2f8;
    --surface: #ffffff;
    --border: #e2e6f0;
    --text: #1a1d2e;
    --muted: #6b7280;
    --positive: #e53e3e;
    --negative: #38a169;
    --highlight-bg: rgba(102,126,234,0.07);
}

/* Access registry and local administration */
.access-body,
.admin-body {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(9, 105, 218, 0.045), transparent 260px),
        var(--web-bg);
}

.web-mode [hidden] {
    display: none !important;
}

.access-topbar,
.admin-topbar {
    min-height: 68px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--web-border);
}

.access-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--web-text);
    text-decoration: none;
}

.access-brand > span:last-child {
    display: grid;
    gap: 2px;
}

.access-brand strong {
    font-size: 16px;
    line-height: 1.2;
}

.access-brand small {
    color: var(--web-muted);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.13em;
}

.access-security {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #1a7f37;
    font-size: 12px;
    font-weight: 600;
}

.access-security::before {
    width: 7px;
    height: 7px;
    content: "";
    border-radius: 50%;
    background: #2da44e;
    box-shadow: 0 0 0 3px #dafbe1;
}

.access-shell,
.admin-shell {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 52px 0;
}

.access-ledger {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
    overflow: hidden;
    background: var(--web-surface);
    border: 1px solid var(--web-border);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(31, 35, 40, 0.08);
}

.access-intro,
.access-form-panel {
    padding: 48px;
}

.access-intro {
    color: #f0f6fc;
    background: #17243a;
}

.access-kicker {
    margin: 0 0 10px;
    color: var(--web-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.access-intro .access-kicker {
    color: #79c0ff;
}

.access-intro h1,
.admin-auth-card h1,
.admin-heading h1 {
    margin: 0;
    color: inherit;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.access-lead {
    max-width: 470px;
    margin: 18px 0 34px;
    color: #b6c2d2;
    font-size: 15px;
    line-height: 1.8;
}

.access-status-track {
    position: relative;
    display: grid;
    gap: 0;
    margin: 0 0 34px;
}

.access-status-track::before {
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 17px;
    width: 1px;
    content: "";
    background: #3b4b63;
}

.access-track-step {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 70px;
    color: #8b99ac;
}

.access-track-step > span {
    z-index: 1;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid #43536b;
    border-radius: 50%;
    background: #17243a;
    font-size: 12px;
    font-weight: 700;
}

.access-track-step strong,
.access-track-step small {
    display: block;
}

.access-track-step strong {
    margin-bottom: 4px;
    color: #b6c2d2;
    font-size: 14px;
}

.access-track-step small {
    font-size: 12px;
}

.access-track-step.is-active > span {
    color: #ffffff;
    border-color: #58a6ff;
    background: #0969da;
    box-shadow: 0 0 0 4px rgba(88, 166, 255, 0.16);
}

.access-track-step.is-active strong,
.access-track-step.is-complete strong {
    color: #ffffff;
}

.access-track-step.is-complete > span {
    color: #17243a;
    border-color: #56d364;
    background: #56d364;
}

.access-identity {
    margin: 0;
    overflow: hidden;
    border: 1px solid #34445c;
    border-radius: 8px;
}

.access-identity div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
}

.access-identity div + div {
    border-top: 1px solid #34445c;
}

.access-identity dt {
    color: #8b99ac;
    font-size: 12px;
}

.access-identity dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #e6edf3;
    font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 12px;
    font-weight: 650;
}

.access-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.access-form-head {
    margin-bottom: 26px;
}

.access-form-head h2,
.admin-panel h2 {
    margin: 0;
    color: var(--web-text);
    font-size: 22px;
    letter-spacing: -0.02em;
}

.access-form-head > p:last-child,
.admin-auth-card > p,
.admin-panel-head p {
    margin: 8px 0 0;
    color: var(--web-muted);
    font-size: 13px;
    line-height: 1.65;
}

.access-form {
    display: grid;
    gap: 18px;
}

.access-form label {
    display: grid;
    gap: 7px;
    color: var(--web-text);
    font-size: 13px;
    font-weight: 600;
}

.access-form label > span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.access-form b {
    color: #cf222e;
}

.access-form em {
    color: var(--web-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
}

.access-form input,
.access-form textarea,
.admin-filter select,
.admin-grant {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--web-border);
    border-radius: 6px;
    outline: none;
    background: var(--web-surface);
    color: var(--web-text);
    font: inherit;
    font-weight: 400;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.access-form input,
.access-form textarea {
    padding: 10px 12px;
}

.access-form textarea {
    min-height: 132px;
    resize: vertical;
    line-height: 1.65;
}

.access-form input:focus,
.access-form textarea:focus,
.admin-filter select:focus,
.admin-grant:focus {
    border-color: var(--web-accent);
    box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.14);
}

.access-form label > small {
    justify-self: end;
    margin-top: -2px;
    color: var(--web-muted);
    font-size: 11px;
    font-weight: 400;
}

.access-primary,
.access-secondary,
.access-danger {
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--web-sans);
    font-size: 13px;
    font-weight: 650;
    line-height: 20px;
    text-decoration: none;
}

.access-primary {
    color: #ffffff;
    border-color: #0969da;
    background: #0969da;
}

.access-primary:hover { background: #0550ae; }
.access-primary.is-compact { min-height: 34px; padding: 6px 14px; }

.access-secondary {
    color: var(--web-text);
    border-color: var(--web-border);
    background: var(--web-surface-2);
}

.access-secondary:hover { background: #eaeef2; }
.access-secondary.is-link { display: inline-flex; align-items: center; }

.access-danger {
    color: #cf222e;
    border-color: rgba(207, 34, 46, 0.35);
    background: #ffffff;
}

.access-danger:hover { background: #ffebe9; }

.access-primary:focus-visible,
.access-secondary:focus-visible,
.access-danger:focus-visible,
.admin-tabs button:focus-visible {
    outline: 3px solid rgba(9, 105, 218, 0.3);
    outline-offset: 2px;
}

.access-primary:disabled,
.access-secondary:disabled,
.access-danger:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.access-notice {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #b6d6f2;
    border-radius: 7px;
    background: var(--web-accent-soft);
    color: #0550ae;
    font-size: 13px;
    line-height: 1.55;
}

.access-notice.is-error {
    color: #a40e26;
    border-color: #ff818266;
    background: var(--web-danger-soft);
}

.access-notice.is-success {
    color: #116329;
    border-color: #4ac26b66;
    background: var(--web-success-soft);
}

.access-submitted {
    text-align: center;
}

.access-stamp {
    width: 86px;
    height: 86px;
    margin: 0 auto 22px;
    display: grid;
    place-items: center;
    border: 2px solid #bf8700;
    border-radius: 50%;
    color: #9a6700;
    background: #fff8c5;
    font-size: 14px;
    font-weight: 750;
    transform: rotate(-5deg);
}

.access-stamp.is-approved { color: #1a7f37; border-color: #2da44e; background: #dafbe1; }
.access-stamp.is-rejected { color: #cf222e; border-color: #cf222e; background: #ffebe9; }

.access-submitted h3 {
    margin: 0;
    font-size: 22px;
}

.access-submitted p {
    margin: 10px auto 24px;
    max-width: 420px;
    color: var(--web-muted);
    font-size: 13px;
    line-height: 1.7;
}

.access-submitted button + button { margin-left: 8px; }

.access-footnote {
    margin: 18px 0 0;
    color: var(--web-muted);
    text-align: center;
    font-size: 11px;
}

.admin-top-actions {
    display: flex;
    gap: 8px;
}

.admin-shell {
    max-width: 1060px;
}

.admin-auth-card {
    width: min(440px, 100%);
    box-sizing: border-box;
    margin: 34px auto 0;
    padding: 36px;
    border: 1px solid var(--web-border);
    border-radius: 10px;
    background: var(--web-surface);
    box-shadow: 0 12px 36px rgba(31, 35, 40, 0.07);
}

.admin-auth-card h1 {
    color: var(--web-text);
    font-size: 28px;
}

.admin-auth-card .access-form {
    margin-top: 26px;
}

.admin-heading,
.admin-panel-head,
.admin-record-head,
.admin-record-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.admin-heading {
    margin-bottom: 24px;
}

.admin-heading h1 {
    color: var(--web-text);
    font-size: 32px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.admin-stats article {
    padding: 18px 20px;
    border: 1px solid var(--web-border);
    border-radius: 8px;
    background: var(--web-surface);
}

.admin-stats span,
.admin-stats strong {
    display: block;
}

.admin-stats span {
    color: var(--web-muted);
    font-size: 12px;
}

.admin-stats strong {
    margin-top: 7px;
    color: var(--web-text);
    font-size: 27px;
    line-height: 1;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: -1px;
    padding: 0 12px;
}

.admin-tabs button {
    padding: 11px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    background: transparent;
    color: var(--web-muted);
    font: 600 13px var(--web-sans);
}

.admin-tabs button:hover { color: var(--web-text); }
.admin-tabs button.is-active { color: var(--web-accent); border-bottom-color: var(--web-accent); }

.admin-panel {
    padding: 24px;
    border: 1px solid var(--web-border);
    border-radius: 8px;
    background: var(--web-surface);
}

.admin-data-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 24px;
}

.admin-data-summary,
.admin-data-form {
    padding: 22px;
    border: 1px solid var(--web-border-muted);
    border-radius: 7px;
    background: #ffffff;
}

.admin-data-summary > span {
    color: var(--web-muted);
    font-size: 12px;
}

.admin-data-summary > strong {
    display: block;
    margin-top: 7px;
    color: var(--web-text);
    font-size: 28px;
}

.admin-intervals {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
}

.admin-intervals div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
}

.admin-intervals dt {
    color: var(--web-muted);
    font-size: 12px;
}

.admin-intervals dd {
    margin: 0;
    color: var(--web-text);
    font-size: 13px;
}

.admin-data-form {
    align-content: start;
}

.admin-allowlist-form {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--web-border-muted);
}

.admin-allowlist-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.admin-allowlist-fields .access-primary {
    white-space: nowrap;
}

.admin-form-note {
    margin: 10px 0 0;
    color: var(--web-muted);
    font-size: 12px;
    line-height: 1.6;
}

.admin-data-form p {
    margin: 0;
    color: var(--web-muted);
    font-size: 12px;
    line-height: 1.65;
}

.admin-panel-head {
    align-items: flex-end;
    margin-bottom: 20px;
}

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

.admin-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--web-muted);
    font-size: 12px;
}

.admin-filter input,
.admin-filter select,
.admin-grant {
    min-height: 34px;
}

.admin-filter input {
    width: 220px;
    padding: 5px 10px;
}

.admin-filter select,
.admin-grant {
    width: auto;
    padding: 5px 30px 5px 10px;
}

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

.admin-record {
    padding: 20px;
    border: 1px solid var(--web-border-muted);
    border-left: 3px solid #bf8700;
    border-radius: 7px;
    background: #ffffff;
}

.admin-record.is-approved { border-left-color: #2da44e; }
.admin-record.is-rejected,
.admin-record.is-revoked { border-left-color: #8c959f; }

.admin-record-head {
    align-items: flex-start;
}

.admin-record-head time {
    color: var(--web-muted);
    font-size: 11px;
    white-space: nowrap;
}

.admin-record-identity {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.admin-record-identity h3 {
    margin: 0;
    font-size: 16px;
}

.admin-status {
    padding: 2px 7px;
    border-radius: 20px;
    color: #9a6700;
    background: #fff8c5;
    font-size: 11px;
    font-weight: 650;
}

.admin-status.is-approved { color: #1a7f37; background: #dafbe1; }
.admin-status.is-rejected,
.admin-status.is-revoked { color: #57606a; background: #eaeef2; }

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

.admin-meta div {
    min-width: 0;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 8px;
}

.admin-meta dt {
    color: var(--web-muted);
    font-size: 11px;
}

.admin-meta dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--web-text);
    font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
}

.admin-message {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    background: var(--web-surface-2);
}

.admin-message span {
    display: block;
    margin-bottom: 5px;
    color: var(--web-muted);
    font-size: 11px;
}

.admin-message p {
    margin: 0;
    color: var(--web-text);
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.admin-feedback-reply {
    min-height: 92px;
    margin-top: 16px;
}

.admin-load-more {
    display: block;
    margin: 16px auto 0;
}

.admin-record-actions {
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--web-border-muted);
}

.admin-record-actions .admin-grant { margin-right: auto; }

.admin-empty {
    padding: 54px 20px;
    border: 1px dashed var(--web-border);
    border-radius: 7px;
    color: var(--web-muted);
    text-align: center;
}

.admin-empty strong {
    color: var(--web-text);
    font-size: 14px;
}

.admin-empty p {
    margin: 6px 0 0;
    font-size: 12px;
}

.admin-revoked-time {
    margin: 14px 0 0;
    color: var(--web-muted);
    font-size: 11px;
}

.admin-password-form {
    max-width: 520px;
}

@media (max-width: 800px) {
    .access-topbar,
    .admin-topbar {
        min-height: 60px;
        padding: 0 18px;
    }

    .access-shell,
    .admin-shell {
        width: min(100% - 24px, 680px);
        padding: 24px 0 36px;
    }

    .access-ledger {
        grid-template-columns: 1fr;
    }

    .access-intro,
    .access-form-panel {
        padding: 30px 24px;
    }

    .access-intro h1 {
        font-size: 29px;
    }

    .access-lead {
        margin-bottom: 22px;
    }

    .access-status-track {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 24px;
    }

    .access-status-track::before {
        top: 17px;
        right: 12%;
        bottom: auto;
        left: 12%;
        width: auto;
        height: 1px;
    }

    .access-track-step {
        grid-template-columns: 1fr;
        gap: 7px;
        min-height: 0;
        text-align: center;
    }

    .access-track-step > span {
        justify-self: center;
    }

    .access-track-step small {
        display: none;
    }

    .access-track-step strong {
        font-size: 12px;
    }

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

    .admin-stats article {
        padding: 14px;
    }

    .admin-panel {
        padding: 18px;
    }

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

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

    .admin-allowlist-fields .access-primary {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .access-security { display: none; }
    .access-brand strong { font-size: 14px; }
    .access-brand small { font-size: 9px; }

    .admin-top-actions .is-link { display: none; }

    .admin-heading,
    .admin-panel-head,
    .admin-record-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-heading .access-secondary { width: 100%; }

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

    .admin-stats article {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .admin-stats strong { margin-top: 0; }

    .admin-tabs {
        padding: 0;
        overflow-x: auto;
    }

    .admin-tabs button { flex: 1 0 auto; }

    .admin-filters,
    .admin-panel-head .admin-filter,
    .admin-panel-head .admin-filter input,
    .admin-panel-head .admin-filter select {
        width: 100%;
    }

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

    .admin-record-head time { white-space: normal; }

    .admin-record-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .admin-record-actions .admin-grant {
        width: 100%;
        grid-column: 1 / -1;
    }

    .admin-record-actions > :only-child {
        grid-column: 1 / -1;
    }

    .admin-auth-card {
        margin-top: 6px;
        padding: 26px 20px;
    }

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

    .admin-allowlist-fields .access-primary {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .access-form input,
    .access-form textarea,
    .admin-filter select,
    .admin-grant {
        transition: none;
    }
}

body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    height: 100vh;
    color: var(--text);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── App Body (sidebar + main) ── */
.app-body {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* ── Strategy Sidebar ── */
.strategy-nav {
    width: 96px;
    background: #1e2235;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 6px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #3a3f5c transparent;
    flex-shrink: 0;
}

.strategy-nav::-webkit-scrollbar { width: 3px; }
.strategy-nav::-webkit-scrollbar-thumb { background: #3a3f5c; border-radius: 2px; }

.strategy-btn {
    width: 100%;
    padding: 8px 6px;
    border: none;
    background: transparent;
    color: #8892b0;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    line-height: 1.3;
    font-family: inherit;
    word-break: break-all;
}

.strategy-btn i { font-size: 14px; opacity: 0.7; }
.strategy-btn span { font-size: 11px; }
.strategy-btn:hover { background: #2a3050; color: #ccd6f6; }
.strategy-btn.active { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.strategy-btn.active i { opacity: 1; }

/* ── Main Content ── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

/* ── Header ── */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(102,126,234,0.3);
}

.header-content h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-content h1 i { font-size: 16px; opacity: 0.85; }
.header-meta { font-size: 11px; font-weight: 400; opacity: 0.65; letter-spacing: 0.3px; }
.subtitle { display: none; }

.stats-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 32px;
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-shrink: 0;
}

.hstat {
    text-align: center;
    line-height: 1.4;
}

.hstat-label {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.3px;
}

.hstat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.export-controls {
    display: flex;
    gap: 8px;
}

/* ── Buttons ── */
.btn {
    padding: 7px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-primary  { background: rgba(255,255,255,0.25); color: white; border: 1px solid rgba(255,255,255,0.4); }
.btn-warning  { background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.3); }
.btn-secondary{ background: rgba(255,255,255,0.1);  color: white; border: 1px solid rgba(255,255,255,0.25); }

/* ── Filter Bar ── */
.filter-controls {
    background: var(--surface);
    padding: 10px 32px;
    display: flex;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    justify-content: center;
    flex-shrink: 0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.filter-group input,
.filter-group select {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
}

/* ── Table Wrapper ── */
.table-wrapper {
    padding: 20px 32px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.table-container {
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    max-width: fit-content;
    margin: 0 auto;
    max-height: 100%;
}

/* ── Table ── */
table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 1098px;
    min-width: 1098px;
    background: var(--surface);
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

th {
    padding: 11px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
}

/* Column widths */
th:nth-child(1), td:nth-child(1) { width: 120px; }  /* 管理人 */
th:nth-child(2), td:nth-child(2) { width: 110px; }  /* 规模 */
th:nth-child(3), td:nth-child(3) { width: 190px; }  /* 产品名称 */
th:nth-child(4), td:nth-child(4) { width: 82px; }   /* 策略类型 */
th:nth-child(5), td:nth-child(5) { width: 68px; }   /* 近一周 */
th:nth-child(6), td:nth-child(6) { width: 68px; }   /* 近一月 */
th:nth-child(7), td:nth-child(7) { width: 68px; }   /* 今年以来 */
th:nth-child(8), td:nth-child(8) { width: 68px; }   /* 近一年 */
th:nth-child(9), td:nth-child(9) { width: 68px; }   /* 近一年夏普 */
th:nth-child(10), td:nth-child(10) { width: 68px; } /* 近一年MDD */
th:nth-child(11), td:nth-child(11) { width: 62px; } /* 2025 */
th:nth-child(12), td:nth-child(12) { width: 62px; } /* 2024 */
th:nth-child(13), td:nth-child(13) { width: 62px; } /* 2023 */

td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

tbody tr { transition: background 0.15s; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--highlight-bg); }

.positive { color: var(--positive); font-weight: 600; }
.negative { color: var(--negative); font-weight: 600; }

.mdd { color: var(--muted) !important; font-weight: 400; }

.product-name {
    text-align: left;
    font-weight: 500;
    color: var(--text);
    padding-left: 12px;
}

.scale { font-size: 11px; color: var(--muted); }

/* Benchmark row */
.benchmark-row { background: #fffbeb !important; }
.benchmark-row:hover { background: #fef3c7 !important; }
.benchmark-row td { font-weight: 600; }
.benchmark-row td:first-child { color: #b45309 !important; }

/* ── Loading ── */
.loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    font-size: 15px;
    color: var(--accent);
    gap: 10px;
    backdrop-filter: blur(2px);
}

/* ── Footer ── */
.footer {
    background: #1a1d2e;
    color: #9ca3af;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    flex-shrink: 0;
}

.copyright { opacity: 0.5; }

@media (max-width: 900px) {
    .header { padding: 0 16px; height: auto; flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
    .header-stats { display: none; }
    .strategy-bar, .filter-controls, .table-wrapper { padding-left: 16px; padding-right: 16px; }
}

.web-mode {
    --web-bg: #f6f8fa;
    --web-surface: #ffffff;
    --web-surface-2: #f6f8fa;
    --web-border: #d0d7de;
    --web-border-muted: #d8dee4;
    --web-text: #24292f;
    --web-muted: #57606a;
    --web-accent: #0969da;
    --web-accent-soft: #ddf4ff;
    --web-success-soft: #dafbe1;
    --web-danger-soft: #ffebe9;
    --web-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    background: var(--web-bg);
    color: var(--web-text);
    min-height: 100vh;
    height: auto;
    overflow: auto;
    display: block;
    font-family: var(--web-sans);
}

.web-mode button,
.web-mode input,
.web-mode select,
.web-mode textarea {
    font: inherit;
}

.web-topbar {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 20px;
    background: var(--web-surface);
    border-bottom: 1px solid var(--web-border);
    position: sticky;
    top: 0;
    z-index: 20;
}

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

.web-mark {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2da44e;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.65);
    flex: 0 0 auto;
}

.web-eyebrow,
.web-sync,
.web-stat-label,
.web-stat-hint,
.web-panel-head span,
.web-field span,
.web-table th {
    color: var(--web-muted);
}

.web-eyebrow {
    font-size: 10px;
    letter-spacing: .08em;
    font-weight: 600;
}

.web-topbar h1 {
    margin: 1px 0 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--web-text);
}

.web-sync {
    font-size: 12px;
    white-space: nowrap;
}

.web-btn {
    min-height: 32px;
    padding: 5px 12px;
    border: 1px solid rgba(31,35,40,.15);
    border-radius: 6px;
    background: #f6f8fa;
    color: var(--web-text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.web-btn:hover {
    background: #f3f4f6;
    border-color: rgba(31,35,40,.25);
}

.web-shell {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.web-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.web-stat,
.web-panel {
    background: var(--web-surface);
    border: 1px solid var(--web-border);
    border-radius: 6px;
}

.web-stat {
    min-height: 88px;
    padding: 14px 16px;
}

.web-stat-label {
    font-size: 12px;
    font-weight: 600;
}

.web-stat-value {
    margin-top: 7px;
    font-size: 28px;
    line-height: 1;
    color: var(--web-text);
    font-weight: 700;
}

.web-stat-hint {
    margin-top: 9px;
    font-size: 12px;
}

.web-panel {
    min-width: 0;
    padding: 12px;
}

.web-filter-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 170px 170px 340px;
    gap: 12px;
    align-items: end;
}

.web-field {
    display: grid;
    gap: 6px;
}

.web-field span {
    font-size: 12px;
    font-weight: 600;
}

.web-field input,
.web-field select {
    width: 100%;
    height: 34px;
    border: 1px solid var(--web-border);
    border-radius: 6px;
    background: var(--web-surface);
    color: var(--web-text);
    padding: 0 10px;
    outline: none;
    font-size: 13px;
}

.web-field input:focus,
.web-field select:focus {
    border-color: var(--web-accent);
    box-shadow: 0 0 0 3px rgba(9,105,218,.16);
}

.web-sort-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px auto;
    gap: 10px;
    align-items: center;
}

.web-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.web-rank-lock,
.web-excess-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    cursor: pointer;
    white-space: nowrap;
}

.web-excess-toggle {
    min-width: 54px;
}

.web-rank-lock input,
.web-excess-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: var(--web-accent);
    box-shadow: none;
    cursor: pointer;
}

.web-excess-toggle.is-disabled {
    cursor: not-allowed;
    opacity: .45;
}

.web-excess-toggle.is-disabled input {
    cursor: not-allowed;
}

.web-clear-filters {
    height: 34px;
    padding: 5px 10px;
    white-space: nowrap;
}

.web-table-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.web-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.web-panel-head h2 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--web-text);
}

.web-filter-summary {
    margin-top: 3px;
    color: var(--web-muted);
    font-size: 12px;
    line-height: 1.45;
}

.web-panel-head span {
    font-size: 12px;
}

.web-table-wrap {
    overflow: auto;
    border: 1px solid var(--web-border);
    border-radius: 6px;
    background: var(--web-surface);
    max-height: calc(100vh - 276px);
}

.web-table {
    width: 100%;
    min-width: 1174px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
}

.web-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--web-surface-2);
    font-size: 12px;
    font-weight: 600;
}

.web-table th,
.web-table td {
    padding: 9px 10px;
    border-bottom: 1px solid var(--web-border-muted);
    text-align: center;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.web-table td {
    color: var(--web-text);
}

.web-table tr:last-child td {
    border-bottom: none;
}

.web-table tr:hover td {
    background: var(--web-surface-2);
}

.web-index-manager-row td {
    background: #eff6ff;
}

.web-table .web-index-manager-row:hover td {
    background: #dbeafe;
}

.web-table .col-rank { width: 68px; }
.web-table .col-manager { width: 120px; text-align: left; }
.web-table .col-scale { width: 128px; }
.web-table .col-strategy { width: 100px; }
.web-table .col-week,
.web-table .col-month,
.web-table .col-ytd { width: 86px; }

.web-mobile-break { display: none; }

.web-main-cell {
    font-weight: 600;
}

.web-index-manager-tag {
    display: inline-block;
    max-width: 100%;
    padding: 2px 7px;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    background: #dbeafe;
    color: #1d4ed8;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.web-positive {
    color: var(--positive);
    font-weight: 700;
}

.web-negative {
    color: var(--negative);
    font-weight: 700;
}

.web-benchmark-row td {
    background: var(--web-accent-soft);
}

.web-empty {
    padding: 24px !important;
    color: var(--web-muted) !important;
    text-align: center !important;
}

.web-feedback-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.web-feedback-shell {
    width: min(100%, 1040px);
    margin: 0 auto;
    padding: 46px 24px 64px;
}

.web-feedback-intro {
    max-width: 620px;
    margin-bottom: 28px;
}

.web-feedback-kicker {
    margin: 0 0 8px;
    color: var(--web-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
}

.web-feedback-intro h2 {
    margin: 0;
    color: var(--web-text);
    font-size: 28px;
    line-height: 1.25;
}

.web-feedback-intro > p:last-child {
    margin: 10px 0 0;
    color: var(--web-muted);
    font-size: 13px;
    line-height: 1.7;
}

.web-feedback-stream {
    min-width: 0;
}

.web-feedback-stream-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.web-feedback-stream-head h2 {
    margin: 0;
    color: var(--web-text);
    font-size: 14px;
    font-weight: 650;
}

.web-feedback-compose {
    align-self: start;
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--web-border-muted);
    border-radius: 6px;
    background: var(--web-surface-2);
    position: sticky;
    top: 78px;
}

.web-feedback-compose label {
    color: var(--web-text);
    font-size: 13px;
    font-weight: 650;
}

.web-feedback-identity {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
}

.web-feedback-identity legend {
    margin-bottom: 7px;
    color: var(--web-text);
    font-size: 13px;
    font-weight: 650;
}

.web-feedback-identity > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 3px;
    border: 1px solid var(--web-border);
    border-radius: 6px;
    background: var(--web-surface);
}

.web-feedback-identity label {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.web-feedback-identity label:has(input:checked) {
    background: var(--web-accent-soft);
    color: #0550ae;
}

.web-feedback-identity input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--web-accent);
}

.web-feedback-compose textarea,
.admin-feedback-reply {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--web-border);
    border-radius: 6px;
    outline: none;
    resize: vertical;
    background: var(--web-surface);
    color: var(--web-text);
    font-size: 13px;
    line-height: 1.65;
}

.web-feedback-compose textarea:focus,
.admin-feedback-reply:focus {
    border-color: var(--web-accent);
    box-shadow: 0 0 0 3px rgba(9,105,218,.16);
}

.web-feedback-compose-foot,
.web-feedback-head,
.web-feedback-reply-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.web-feedback-compose-foot > span,
.web-feedback-compose > p,
.web-feedback-head time,
.web-feedback-reply-head time {
    color: var(--web-muted);
    font-size: 11px;
}

.web-feedback-compose > p {
    margin: 0;
    line-height: 1.55;
}

.web-feedback-submit {
    color: #ffffff;
    border-color: #0969da;
    background: #0969da;
}

.web-feedback-submit:hover { background: #0550ae; }

.web-feedback-submit:disabled,
.web-feedback-load:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.web-feedback-notice {
    padding: 9px 10px;
    border-radius: 5px;
    color: #0550ae;
    background: var(--web-accent-soft);
    font-size: 12px;
    line-height: 1.5;
}

.web-feedback-notice.is-success { color: #116329; background: var(--web-success-soft); }
.web-feedback-notice.is-error { color: #a40e26; background: var(--web-danger-soft); }

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

.web-feedback-card {
    padding: 15px 16px;
    border: 1px solid var(--web-border-muted);
    border-radius: 6px;
    background: var(--web-surface);
}

.web-feedback-head strong,
.web-feedback-reply-head strong {
    color: var(--web-text);
    font-size: 13px;
}

.web-feedback-content,
.web-feedback-reply p {
    margin: 9px 0 0;
    color: var(--web-text);
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.web-feedback-reply {
    position: relative;
    margin: 14px 0 0 18px;
    padding: 11px 13px;
    border-left: 3px solid var(--web-accent);
    border-radius: 0 5px 5px 0;
    background: var(--web-accent-soft);
}

.web-feedback-reply p { margin-top: 6px; }

.web-feedback-load {
    display: block;
    margin: 12px auto 0;
}

.web-feedback-empty {
    padding: 36px 20px;
    border: 1px dashed var(--web-border);
    border-radius: 6px;
    color: var(--web-muted);
    text-align: center;
}

.web-feedback-empty strong { color: var(--web-text); }
.web-feedback-empty p { margin: 6px 0 0; font-size: 12px; }

.web-loading {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    background: rgba(246, 248, 250, .82);
    color: var(--web-accent);
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 980px) {
    .web-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .web-table-wrap {
        max-height: none;
    }

    .web-feedback-layout {
        grid-template-columns: 1fr;
    }

    .web-feedback-compose {
        position: static;
    }
}

@media (max-width: 720px) {
    .web-topbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
        padding: 10px 12px;
    }

    .web-actions {
        width: 100%;
        justify-content: space-between;
    }

    .web-topbar h1 {
        font-size: 14px;
        line-height: 1.35;
    }

    .web-shell {
        gap: 10px;
        padding: 10px;
    }

    .web-feedback-shell {
        padding: 26px 12px 40px;
    }

    .web-feedback-intro {
        margin-bottom: 20px;
    }

    .web-feedback-intro h2 {
        font-size: 23px;
    }

    .web-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .web-wide-only,
    .web-desktop-only,
    .web-desktop-col {
        display: none !important;
    }

    .web-table .col-month {
        display: none !important;
    }

    .web-stat {
        min-height: 64px;
        padding: 10px 12px;
    }

    .web-stat-value {
        font-size: 24px;
    }

    .web-panel {
        padding: 10px;
    }

    .web-filter-grid {
        grid-template-columns: 1fr;
    }

    .web-sort-row {
        grid-template-columns: 1fr;
    }

    .web-filter-actions,
    .web-filter-summary {
        display: none;
    }

    .web-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .web-table-wrap {
        overflow-x: hidden;
        overflow-y: visible;
        border-radius: 6px;
    }

    .web-table {
        min-width: 0;
        table-layout: fixed;
        width: 100%;
    }

    .web-table .col-rank {
        width: 14%;
    }

    .web-table .col-manager {
        width: 24%;
    }

    .web-table .col-scale {
        width: 18%;
    }

    .web-table .col-strategy {
        width: 20%;
    }

    .web-table .col-week,
    .web-table .col-ytd {
        width: 12%;
    }

    .web-table th,
    .web-table td {
        font-size: 10px;
        padding: 7px 4px;
        white-space: normal;
        line-height: 1.25;
    }

    .web-table th.col-week,
    .web-table th.col-ytd {
        white-space: normal;
        font-size: 10px;
        font-weight: 700;
    }

    .web-mobile-break { display: initial; }

    .web-table td.col-rank,
    .web-table td.col-week,
    .web-table td.col-ytd {
        white-space: nowrap;
        font-size: 11px;
        font-weight: 700;
    }

    .web-main-cell {
        word-break: break-all;
    }
}
