.em-reports-page {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 260px, #f1f5f9 100%);
    color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 顶部：打赏、返回主页、浏览/点赞（与其他工具页一致） */
.reward-btn-fixed {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.6);
    z-index: 1001;
    border: none;
    animation: emReportsHeartBeat 1.5s ease-in-out infinite;
}

.reward-btn-fixed:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.8);
}

.reward-btn-fixed i {
    font-size: 28px;
    color: white;
}

@keyframes emReportsHeartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
}

.home-btn-fixed {
    position: fixed;
    top: 20px;
    left: 100px;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    border: none;
    text-decoration: none;
}

.home-btn-fixed:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.home-btn-fixed img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.tool-stats-bar {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 15px;
    background: rgba(30, 41, 59, 0.9);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.stat-item-tool {
    color: #f1f5f9;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-item-tool i {
    color: #ffd700;
}

.stat-item-tool strong {
    color: #fff;
    font-weight: bold;
}

.stat-btn-tool {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    padding: 6px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-btn-tool:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.6);
}

.stat-btn-tool:active {
    transform: translateY(0);
}

.stat-btn-tool.love-active {
    color: #ffd700 !important;
}

@media (max-width: 768px) {
    .reward-btn-fixed {
        top: 15px;
        left: 15px;
        width: 50px;
        height: 50px;
    }

    .reward-btn-fixed i {
        font-size: 24px;
    }

    .home-btn-fixed {
        top: 15px;
        left: 75px;
        width: 50px;
        height: 50px;
    }

    .home-btn-fixed img {
        width: 35px;
        height: 35px;
    }

    .tool-stats-bar {
        top: 15px;
        right: 15px;
        padding: 5px 12px;
        gap: 8px;
    }

    .stat-item-tool {
        font-size: 11px;
    }

    .stat-btn-tool {
        padding: 5px 12px;
        font-size: 11px;
    }
}

.em-reports-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 16px 48px;
}

.em-reports-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.em-reports-head {
    padding: 28px 28px 12px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.em-reports-head h1 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
    color: #9a3412;
}

.em-reports-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.em-reports-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #fafafa;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.em-reports-tabs::-webkit-scrollbar {
    display: none;
}

.em-reports-tab {
    appearance: none;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.em-reports-tab:hover {
    color: #b45309;
    background: rgba(255, 247, 237, 0.6);
}

.em-reports-tab.is-active {
    color: #b45309;
    font-weight: 600;
    border-bottom-color: #b45309;
    background: #fff;
}

.em-reports-badge-type {
    margin-left: auto;
    background: #ffedd5;
    color: #9a3412;
}

.em-reports-badge-tier {
    margin-left: 8px;
    background: #eef6ff;
    color: #1a5fb4;
}

.em-reports-batch-panel {
    margin: 16px 0 8px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}

.em-reports-batch-panel summary {
    cursor: pointer;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #1d4ed8;
    list-style-position: inside;
}

.em-reports-batch-panel[open] summary {
    border-bottom: 1px solid #dbeafe;
}

.em-reports-batch-body {
    padding: 14px 16px 16px;
}

.em-reports-batch-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}

.em-reports-batch-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 12px;
}

.em-reports-batch-type-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.em-reports-batch-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px 12px;
    margin-bottom: 12px;
}

.em-reports-batch-type-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.em-reports-batch-type-item input {
    margin: 0;
}

.em-reports-batch-summary {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 13px;
    line-height: 1.55;
}

.em-reports-batch-browser-tip {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.55;
}

.em-reports-batch-browser-tip.is-ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.em-reports-batch-browser-tip.is-warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.em-reports-gate {
    padding: 48px 28px;
    text-align: center;
}

.em-reports-gate-icon {
    font-size: 42px;
    color: #cbd5e1;
    margin-bottom: 12px;
}

.em-reports-gate h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.em-reports-gate p {
    margin: 0 0 12px;
    color: #475569;
}

.em-reports-gate-tip {
    font-size: 14px;
    color: #64748b;
}

.em-reports-gate-tip:empty {
    display: none;
    margin: 0;
}

.em-reports-auth-dialog {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.em-reports-auth-dialog[hidden] {
    display: none;
}

.em-reports-auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.em-reports-auth-panel {
    position: relative;
    width: min(440px, 100%);
    padding: 36px 28px 28px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    text-align: center;
}

.em-reports-auth-panel h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.em-reports-auth-panel p {
    margin: 0 0 12px;
    color: #475569;
}

.em-reports-auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

body.em-reports-auth-open {
    overflow: hidden;
}

.em-reports-toolbar {
    padding: 20px 28px 0;
}

.em-reports-toolbar-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
}

.em-reports-controls-row {
    justify-content: space-between;
    gap: 16px;
}

.em-reports-controls-left,
.em-reports-controls-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
}

.em-reports-controls-right {
    margin-left: auto;
    justify-content: flex-end;
    flex: 1 1 360px;
}

.em-reports-search-group {
    align-items: end;
}

.em-reports-search-field span {
    white-space: nowrap;
}

.em-reports-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

.em-reports-field input[type="date"] {
    min-width: 180px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
}

.em-reports-field input[type="search"],
.em-reports-field input[type="text"] {
    min-width: 220px;
    max-width: 320px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
}

.em-reports-search-field {
    flex: 0 1 auto;
}

.em-reports-status-bar {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
    color: #475569;
}

.em-reports-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.em-reports-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0 8px;
}

.em-reports-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.em-reports-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.em-reports-btn-primary {
    background: #2563eb;
    color: #fff;
}

.em-reports-btn-secondary {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.em-reports-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.em-reports-table-wrap {
    padding: 0 16px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.em-reports-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
    font-size: 14px;
}

.em-reports-table th,
.em-reports-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eef2f7;
    text-align: left;
    vertical-align: top;
}

.em-reports-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.em-reports-table tbody tr:hover {
    background: #fffbeb;
}

.col-check {
    width: 42px;
}

.em-reports-title {
    color: #0f172a;
    line-height: 1.45;
    word-break: break-word;
}

.em-reports-title-link {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    color: #1d4ed8;
    text-align: left;
    font: inherit;
    line-height: 1.45;
    cursor: pointer;
    word-break: break-word;
}

.em-reports-title-link:hover {
    text-decoration: underline;
    color: #1e40af;
}

.col-action {
    width: 88px;
    white-space: nowrap;
}

.em-reports-btn-read {
    appearance: none;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.em-reports-btn-read:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.em-reports-reader {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.em-reports-reader[hidden] {
    display: none !important;
}

.em-reports-reader-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.em-reports-reader-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1100px, calc(100vw - 24px));
    height: min(92vh, 900px);
    max-height: calc(100vh - 32px);
    margin: 4vh auto 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.em-reports-reader-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    flex-shrink: 0;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.em-reports-reader-title {
    flex: 1;
    margin: 0;
    min-width: 0;
    font-size: 16px;
    line-height: 1.4;
    color: #0f172a;
    word-break: break-word;
}

.em-reports-reader-close {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 8px 14px;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.em-reports-reader-close-icon {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.em-reports-reader-close-text {
    font-size: 14px;
}

.em-reports-reader-close:hover,
.em-reports-reader-close:focus-visible {
    background: #fef2f2;
    border-color: #f87171;
    color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.25);
    outline: none;
}

.em-reports-reader-body {
    position: relative;
    flex: 1;
    min-height: 0;
    background: #f1f5f9;
}

.em-reports-reader-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    background: #f8fafc;
    z-index: 1;
    pointer-events: none;
}

.em-reports-reader-loading.is-active {
    display: flex;
    pointer-events: auto;
}

.em-reports-reader-loading.is-error {
    color: #b45309;
}

.em-reports-reader-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

body.em-reports-reader-open {
    overflow: hidden;
}

.em-reports-stock,
.em-reports-subject {
    white-space: nowrap;
    color: #92400e;
    font-weight: 600;
}

.em-reports-empty {
    text-align: center;
    color: #64748b;
    padding: 28px 12px !important;
}

.em-reports-summary {
    padding: 0 28px 12px;
    color: #64748b;
    font-size: 14px;
}

.em-reports-progress {
    margin: 0 28px 20px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.em-reports-progress-bar {
    height: 8px;
    background: #fde68a;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.em-reports-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #f59e0b, #b45309);
    transition: width 0.25s ease;
}

.em-reports-seo {
    padding: 24px 28px 32px;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

.em-reports-seo h2 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #334155;
}

.em-reports-seo p {
    margin: 0 0 10px;
    color: #64748b;
    line-height: 1.7;
    font-size: 14px;
}

@media (max-width: 640px) {
    .em-reports-main {
        padding: 16px 12px calc(32px + env(safe-area-inset-bottom, 0px));
    }

    .em-reports-head {
        padding: 20px 16px 10px;
    }

    .em-reports-head h1 {
        font-size: 22px;
    }

    .em-reports-subtitle {
        font-size: 14px;
        line-height: 1.55;
    }

    .em-reports-tabs {
        padding-left: max(12px, env(safe-area-inset-left, 0px));
        padding-right: max(12px, env(safe-area-inset-right, 0px));
    }

    .em-reports-tab {
        min-height: 44px;
        padding: 12px 14px;
        font-size: 13px;
    }

    .em-reports-toolbar {
        padding: 16px 16px 0;
    }

    .em-reports-controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .em-reports-controls-left,
    .em-reports-controls-right {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start;
    }

    .em-reports-controls-right {
        justify-content: flex-end;
    }

    .em-reports-toolbar-row .em-reports-field {
        flex: 1 1 100%;
    }

    .em-reports-field input[type="date"] {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .em-reports-field input[type="search"],
    .em-reports-field input[type="text"] {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .em-reports-search-row .em-reports-search-field {
        flex: 1 1 100%;
    }

    .em-reports-field input[type="search"],
    .em-reports-field input[type="text"] {
        max-width: none;
    }

    .em-reports-toolbar-row .em-reports-btn {
        flex: 1 1 auto;
    }

    .em-reports-btn {
        min-height: 44px;
        touch-action: manipulation;
    }

    .em-reports-actions .em-reports-btn {
        flex: 1 1 calc(50% - 8px);
    }

    .em-reports-batch-panel summary {
        padding: 14px 16px;
        line-height: 1.45;
    }

    .em-reports-batch-type-actions {
        width: 100%;
    }

    .em-reports-batch-type-actions .em-reports-btn {
        flex: 1 1 calc(50% - 4px);
    }

    .em-reports-batch-types {
        grid-template-columns: 1fr 1fr;
    }

    .em-reports-batch-type-item {
        min-height: 44px;
        padding: 4px 0;
    }

    .em-reports-batch-type-item input {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    #btnBatchDownload {
        width: 100%;
    }

    .em-reports-table-wrap {
        padding: 0 0 8px;
    }

    .em-reports-table-wrap::after {
        content: '左右滑动查看更多列';
        display: block;
        text-align: center;
        font-size: 12px;
        color: #94a3b8;
        padding: 8px 12px 4px;
    }

    .em-reports-table .col-check input,
    #checkAll {
        width: 20px;
        height: 20px;
    }

    .em-reports-btn-read {
        padding: 8px 12px;
        min-height: 44px;
        font-size: 13px;
        touch-action: manipulation;
    }

    .em-reports-summary {
        padding: 0 16px 12px;
    }

    .em-reports-progress {
        margin: 0 16px 16px;
    }

    .em-reports-seo {
        padding: 20px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .em-reports-auth-dialog {
        padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    }

    .em-reports-auth-panel {
        width: 100%;
        padding: 28px 20px 24px;
    }

    .em-reports-auth-panel h2 {
        font-size: 20px;
    }

    .em-reports-auth-panel p {
        font-size: 15px;
        line-height: 1.6;
        text-align: left;
    }

    .em-reports-auth-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .em-reports-auth-actions .em-reports-btn {
        width: 100%;
        min-height: 44px;
    }

    .em-reports-reader {
        display: flex;
        flex-direction: column;
    }

    .em-reports-reader-dialog {
        flex: 1;
        width: 100%;
        height: 100%;
        max-height: none;
        margin: 0;
        border-radius: 0;
    }

    .em-reports-reader-head {
        padding: 10px 12px;
        padding-top: max(10px, env(safe-area-inset-top, 0px));
        gap: 10px;
    }

    .em-reports-reader-title {
        font-size: 14px;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .em-reports-reader-close {
        padding: 10px 14px;
        min-width: 48px;
        min-height: 48px;
        border-radius: 12px;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
        touch-action: manipulation;
    }

    .em-reports-reader-close-icon {
        font-size: 24px;
    }

    .em-reports-reader-close-text {
        font-size: 15px;
    }

    .em-reports-reader-body {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

@media (hover: none) {
    .em-reports-btn:not(:disabled):hover,
    .em-reports-tab:hover,
    .em-reports-btn-read:hover,
    .em-reports-title-link:hover {
        transform: none;
        box-shadow: none;
    }

    .em-reports-table tbody tr:hover {
        background: transparent;
    }
}
