/* 多产品HTML报告展示系统 - 样式文件 */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式已移除，为HTML内容留出更多空间 */

/* 主内容区域 */
.main {
    flex: 1;
    padding: 0;
    margin: 0;
    min-height: 100vh;
}

/* 首页样式 */
.index-container {
    text-align: center;
}

.welcome-section {
    margin-bottom: 0.75rem;
}

.user-info {
    margin-top: 0.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    display: inline-block;
}

.user-info span {
    margin-right: 1rem;
    color: #6c757d;
}

.user-info .view-scope {
    color: #343a40;
    font-weight: 600;
}

.view-choice-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f4f6f8;
}

.view-choice-panel {
    width: min(560px, 100%);
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 8px 24px rgba(25, 35, 45, 0.08);
}

.view-choice-panel h2 {
    margin: 0 0 8px;
    color: #20262d;
}

.view-choice-panel p {
    margin: 0 0 24px;
    color: #606a75;
}

.view-choice-form label,
.group-modal-content label {
    display: block;
    margin: 0 0 8px;
    color: #343a40;
    font-weight: 600;
}

.group-key-combobox {
    position: relative;
}

.group-key-control {
    display: flex;
    border: 1px solid #b9c1ca;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.group-key-control:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.16);
}

.group-key-control input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 0;
    border-radius: 4px 0 0 4px;
    outline: 0;
    font-size: 16px;
    color: #20262d;
}

.group-key-control input::placeholder {
    color: #737b84;
}

.group-key-trigger {
    display: flex;
    width: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-left: 1px solid #d2d7dd;
    border-radius: 0 4px 4px 0;
    background: #fff;
    color: #343a40;
    cursor: pointer;
}

.group-key-trigger:hover,
.group-key-trigger[aria-expanded="true"] {
    background: #f1f4f7;
}

.group-key-trigger:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: -3px;
}

.group-key-trigger svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.group-key-options {
    position: absolute;
    z-index: 10;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #c8cfd7;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(25, 35, 45, 0.14);
}

.group-key-option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #343a40;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.group-key-option[hidden] {
    display: none;
}

.group-key-option:hover,
.group-key-option.is-active {
    background: #eaf3ff;
}

.group-key-option[aria-selected="true"] {
    background: #eaf3ff;
}

.group-key-option-name {
    color: #9aa3ad;
    font-size: 14px;
    font-weight: 400;
}

.group-key-option-key {
    color: #343a40;
    font-weight: 600;
}

.group-key-option[aria-selected="true"] .group-key-option-key {
    color: #0056b3;
}

.group-key-empty {
    padding: 12px;
    color: #6c757d;
    text-align: center;
}

.view-group-button {
    width: 100%;
    margin-top: 16px;
    padding: 12px 16px;
    border: 1px solid #007bff;
    border-radius: 4px;
    background: #007bff;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
}

.view-group-button:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.view-group-button:focus-visible {
    outline: 3px solid rgba(0, 123, 255, 0.3);
    outline-offset: 2px;
}

.view-all-form {
    margin-top: 18px;
    text-align: center;
}

.view-all-button {
    padding: 4px;
    border: 0;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.view-all-button:hover {
    color: #343a40;
}

.view-all-button:focus-visible {
    border-radius: 3px;
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.view-choice-error {
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #dc3545;
    border-radius: 4px;
    color: #9f1c28;
    background: #fff2f3;
}

.view-choice-logout {
    display: block;
    margin-top: 24px;
    text-align: center;
    color: #6c757d;
}

@media (max-width: 600px) {
    .view-choice-page {
        align-items: flex-start;
        padding: 16px;
    }

    .view-choice-panel {
        padding: 24px 20px;
    }

    .group-key-options {
        max-height: 200px;
    }
}

.group-admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

.group-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.group-admin-header h2 {
    margin: 0;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.admin-summary-grid-compact {
    max-width: 260px;
}

.admin-summary-card {
    display: flex;
    min-height: 96px;
    padding: 16px 18px;
    border: 1px solid #e0e5ea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(25, 35, 45, 0.06);
    flex-direction: column;
    justify-content: center;
}

.admin-summary-card-primary {
    border-color: #b8d8f3;
    background: #f4f9fd;
}

.admin-summary-label {
    color: #687481;
    font-size: 13px;
    font-weight: 600;
}

.admin-summary-value {
    color: #20262d;
    font-size: 30px;
    line-height: 1.2;
}

.admin-summary-detail {
    color: #8a949e;
    font-size: 12px;
}

.group-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 8px rgba(25, 35, 45, 0.08);
}

.group-table th,
.group-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e6ea;
    text-align: left;
}

.group-table th {
    background: #f7f8fa;
}

.group-description {
    min-width: 260px;
    max-width: 440px;
    color: #4e5965;
    line-height: 1.45;
}

.group-description-empty {
    color: #8a949e;
    font-style: italic;
}

.group-btn {
    display: inline-block;
    padding: 8px 12px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.group-admin-header .group-btn {
    font: inherit;
    line-height: 1.2;
    vertical-align: middle;
}

.group-btn-primary {
    background: #0878d1;
}

.group-btn-secondary {
    background: #687481;
}

.group-btn-danger {
    background: #c93643;
}

.group-badge {
    padding: 2px 6px;
    border-radius: 4px;
    background: #e8edf2;
    color: #4e5965;
    font-size: 12px;
}

.group-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.45);
}

.group-modal-content {
    width: min(460px, calc(100% - 32px));
    margin: 10vh auto 0;
    padding: 24px;
    border-radius: 8px;
    background: #fff;
}

.group-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.group-modal-header h3 {
    margin: 0;
}

.group-modal-close {
    border: 0;
    background: transparent;
    font-size: 26px;
    cursor: pointer;
}

.group-modal-content input,
.group-modal-content textarea {
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 16px;
    padding: 9px 10px;
    border: 1px solid #b9c1ca;
    border-radius: 4px;
}

.group-modal-content textarea {
    min-height: 110px;
    resize: vertical;
    font: inherit;
}

.group-modal-content small {
    display: block;
    margin-top: -8px;
    color: #687481;
}

.group-modal-content small + label {
    margin-top: 18px;
}

.group-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
}

.group-alert {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 4px;
}

.group-alert.error {
    color: #9f1c28;
    background: #fff2f3;
    border: 1px solid #dc3545;
}

@media (max-width: 640px) {
    .view-choice-row,
    .group-admin-header {
        align-items: stretch;
        flex-direction: column;
    }

    .group-table {
        display: block;
        overflow-x: auto;
    }
}

.logout-btn {
    color: #dc3545;
    text-decoration: none;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #dc3545;
    border-radius: 4px;
    transition: all 0.3s;
    margin-left: 0.5rem;
}

.logout-btn:hover {
    background: #dc3545;
    color: white;
}

.change-password-btn {
    color: #007bff;
    text-decoration: none;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #007bff;
    border-radius: 4px;
    transition: all 0.3s;
    margin-left: 0.5rem;
}

.change-password-btn:hover {
    background: #007bff;
    color: white;
}

.security-alert-actions .change-password-btn,
.security-alert-actions .logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 16px;
    font: inherit;
    line-height: 1.2;
    vertical-align: middle;
}

.security-alert-actions .logout-btn {
    cursor: pointer;
}

.welcome-section h2 {
    font-size: 2.5rem;
    color: #343a40;
    margin-bottom: 0.5rem;
}

.welcome-section p {
    font-size: 1.2rem;
    color: #6c757d;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0 24px;
}

.project-status-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.status-filter {
    padding: 8px 15px;
    border: 1px solid #ced4da;
    border-radius: 999px;
    background: #fff;
    color: #495057;
    cursor: pointer;
    font: inherit;
}

.status-filter.active {
    border-color: #007bff;
    background: #007bff;
    color: #fff;
}

.project-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.project-status-badge,
.project-type-badge {
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.project-type-badge { background: #eef1f4; color: #59636e; }
.status-not_started { background: #e9ecef; color: #5f6871; }
.status-active { background: #dcecff; color: #075db7; }
.status-archived { background: #dfe3e7; color: #3f4852; }

.project-status-select {
    padding: 7px 9px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background: #fff;
    color: #343a40;
}

.product-card[data-project-status="archived"] {
    opacity: 0.78;
}

.product-card[hidden] {
    display: none;
}

.product-card {
    display: flex;
    height: 100%;
    background: white;
    padding: 2rem;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.admin-dashboard-shell {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.admin-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 20px;
    padding: 24px 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: linear-gradient(135deg, #17233d 0%, #243a63 100%);
    box-shadow: 0 16px 36px rgba(24, 38, 66, 0.16);
    color: #fff;
}

.admin-dashboard-kicker {
    display: block;
    margin-bottom: 3px;
    color: #8fb8ff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-dashboard-header h2 {
    margin: 0;
    color: #fff;
    font-size: 2rem;
    line-height: 1.15;
}

.admin-dashboard-header p {
    margin: 6px 0 0;
    color: #c6d0df;
    font-size: 0.92rem;
}

.admin-dashboard-account {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
}

.admin-account-chip {
    max-width: 290px;
    overflow: hidden;
    margin-right: 28px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #dbe4f1;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-header-link {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: #fff;
    color: #203456;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.2s;
}

.admin-header-link:hover {
    background: #edf3ff;
    transform: translateY(-1px);
}

.admin-header-link-danger {
    background: transparent;
    color: #ffd9dc;
}

.admin-header-link-danger:hover {
    background: rgba(220, 53, 69, 0.18);
}

.security-alert-banner {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid #dc3545;
    border-radius: 8px;
    background: #fff3f4;
    color: #721c24;
}

.security-alert-banner a {
    margin-left: auto;
    color: #721c24;
    font-weight: 600;
}

.security-alert-badge {
    display: inline-block;
    min-width: 1.5rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.8rem;
    text-align: center;
}

.system-monitor-card {
    margin-bottom: 28px;
    padding: 20px;
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(32, 52, 86, 0.07);
    text-align: left;
}

.system-monitor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 14px;
}

.system-monitor-header h3,
.system-monitor-metric h4 {
    margin: 0;
    color: #343a40;
}

.system-monitor-header h3 {
    font-size: 1.05rem;
}

.system-monitor-header > span {
    margin: 0;
    color: #8a94a3;
    font-size: 0.76rem;
    white-space: nowrap;
}

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

.system-monitor-metric {
    padding: 15px 16px;
    border: 1px solid #e8edf3;
    border-radius: 11px;
    background: #f7f9fc;
}

.system-monitor-metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.system-monitor-metric-header h4 {
    color: #465268;
    font-size: 0.82rem;
}

.system-monitor-percent {
    padding: 3px 8px;
    border-radius: 999px;
    background: #fff0e3;
    color: #c85b00;
    font-size: 0.72rem;
    font-weight: 700;
}

.system-monitor-value {
    margin-bottom: 7px;
    color: #7a8596;
    font-size: 0.78rem;
}

.system-monitor-value strong {
    color: #202a3b;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
}

.system-monitor-value span {
    margin-left: 0.25rem;
}

.system-monitor-metric progress {
    display: block;
    width: 100%;
    height: 6px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: #e5eaf0;
}

.system-monitor-metric progress::-webkit-progress-bar {
    border-radius: 999px;
    background: #e5eaf0;
}

.system-monitor-metric progress::-webkit-progress-value {
    border-radius: 999px;
    background: linear-gradient(90deg, #ff9f43, #f26a1b);
}

.system-monitor-metric progress::-moz-progress-bar {
    border-radius: 999px;
    background: #f26a1b;
}

.system-monitor-unavailable {
    padding: 0.25rem 0;
    color: #8a949e;
}

.admin-tools-section {
    margin-top: 4px;
}

.admin-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
    padding: 0 2px;
}

.admin-section-heading h3 {
    margin: 0;
    color: #202a3b;
    font-size: 1.35rem;
}

.admin-section-heading p {
    margin: 0;
    color: #7a8596;
    font-size: 0.82rem;
}

.admin-tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.admin-tool-card {
    position: relative;
    display: flex;
    min-height: 182px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(32, 52, 86, 0.06);
    color: inherit;
    flex-direction: column;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.admin-tool-card:hover {
    border-color: #b9cbed;
    box-shadow: 0 12px 26px rgba(32, 52, 86, 0.12);
    transform: translateY(-3px);
}

.admin-tool-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    margin-bottom: 17px;
    border-radius: 11px;
    background: #eaf1ff;
    color: #2d68cf;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
}

.admin-tool-card-alert .admin-tool-icon {
    background: #fff0f1;
    color: #c93643;
}

.admin-tool-content {
    flex: 1;
}

.admin-tool-content h4 {
    margin: 0 0 7px;
    color: #202a3b;
    font-size: 1rem;
}

.admin-tool-content p {
    margin: 0;
    color: #687487;
    font-size: 0.82rem;
    line-height: 1.55;
}

.admin-tool-arrow {
    position: absolute;
    top: 21px;
    right: 20px;
    color: #9aa7ba;
    font-size: 1.15rem;
    transition: color 0.2s, transform 0.2s;
}

.admin-tool-card:hover .admin-tool-arrow {
    color: #2d68cf;
    transform: translateX(3px);
}

@media (max-width: 1050px) {
    .admin-tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.security-alert-list {
    display: grid;
    gap: 1rem;
}

.security-alert-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid #dee2e6;
    border-left: 5px solid #6c757d;
    border-radius: 8px;
    background: #fff;
}

.security-alert-item.security-alert-warning {
    border-left-color: #ffc107;
}

.security-alert-item.security-alert-critical {
    border-left-color: #dc3545;
}

.security-alert-item.security-alert-unread {
    background: #fffbea;
}

.security-alert-time {
    margin-left: 0.75rem;
    color: #6c757d;
    font-size: 0.85rem;
}

.security-alert-item p {
    margin: 0.5rem 0;
}

.security-alert-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 120px;
}

.security-alert-blocked-state {
    color: #842029;
    font-size: 0.85rem;
    font-weight: 700;
}

.security-alert-details {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0.75rem 0 0;
    text-align: left;
}

.security-alert-details div {
    padding: 0.5rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #f8f9fa;
}

.security-alert-details dt {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.security-alert-details dd {
    margin: 0.15rem 0 0;
    color: #212529;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.security-alert-ip-intel {
    grid-template-columns: 2fr 1fr 2fr;
}

.security-alert-attempts {
    margin-top: 0.75rem;
    text-align: left;
}

.security-alert-attempts ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
}

.security-alert-attempts li {
    max-width: 100%;
    padding: 0.2rem 0.45rem;
    border: 1px solid #d4dce5;
    border-radius: 4px;
    background: #fff;
    overflow-wrap: anywhere;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
}

@media (max-width: 720px) {
    .security-alert-item {
        flex-direction: column;
    }

    .security-alert-item-actions {
        align-items: stretch;
    }

    .security-alert-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .security-alert-ip-intel {
        grid-template-columns: 1fr;
    }
}

.product-image-container {
    width: 100%;
    height: 200px;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: absolute;
    top: 0;
    left: 0;
}

.placeholder-letter {
    font-size: 4rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 为不同项目生成不同颜色的占位图 */
.product-image-container[data-product-id*="mt200x"] .product-image-placeholder {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.product-image-container[data-product-id*="gpos"] .product-image-placeholder {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.product-image-container[data-product-id*="sk"] .product-image-placeholder {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.product-image-container[data-product-id*="p5"] .product-image-placeholder,
.product-image-container[data-product-id*="P5"] .product-image-placeholder {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.product-image-container[data-product-id*="e1"] .product-image-placeholder {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.product-image-container[data-product-id*="demo"] .product-image-placeholder {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.product-card h3 {
    font-size: 1.5rem;
    color: #343a40;
    margin-bottom: 1rem;
}

.product-description-wrapper {
    margin-bottom: 1.5rem;
    min-height: 2.25rem;
}

.product-card-actions {
    display: flex;
    margin-top: auto;
    padding-top: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.product-description {
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-align: left;
    white-space: pre-line;
    transition: all 0.3s ease;
}

.product-description.description-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3em; /* 大约2行的高度 */
}

.product-spec-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 12px;
    border: 1px solid #007bff;
    border-radius: 6px;
    color: #007bff;
    background: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.product-spec-link:hover {
    background: #007bff;
    color: #fff;
}

.specs-list {
    display: grid;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto 2rem;
}

.project-specs-description {
    max-width: 900px;
    margin: 0 auto 24px;
    padding: 18px 20px;
    border: 1px solid #d9e2ec;
    border-radius: 6px;
    background: #fff;
    color: #343a40;
    text-align: left;
    white-space: pre-line;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.project-specs-description h3 {
    margin-bottom: 10px;
    color: #343a40;
}

.specs-section-divider {
    max-width: 900px;
    margin: 0 auto 16px;
    padding-top: 16px;
    border-top: 1px solid #d9e2ec;
    color: #6c757d;
    text-align: left;
}

.specs-empty {
    padding: 16px;
    border: 1px dashed #ced4da;
    border-radius: 6px;
    color: #6c757d;
    background: #fff;
    text-align: center;
}

.specs-list-item {
    display: grid;
    grid-template-columns: minmax(120px, 0.35fr) minmax(220px, 1fr) minmax(150px, 0.38fr);
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #d9e2ec;
    border-radius: 6px;
    background: #fff;
    color: #343a40;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.specs-list-item:hover {
    border-color: #007bff;
}

.specs-list-label {
    min-width: 0;
}

.specs-list-file {
    color: #6c757d;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
    text-align: left;
}

.specs-list-time {
    color: #868e96;
    font-size: 0.85rem;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .specs-list-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .specs-list-time {
        text-align: left;
    }
}

.product-link {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s;
    font-weight: 500;
}

.product-link:hover {
    background: #0056b3;
}

.info-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.info-section h3 {
    color: #343a40;
    margin-bottom: 1rem;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.info-section li:before {
    content: "✓ ";
    color: #28a745;
    font-weight: bold;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: #343a40;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #6c757d;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid #f5c6cb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-icon {
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #343a40;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background: #0056b3;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
}

.back-link {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    color: #343a40;
}

.auth-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.auth-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.auth-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.auth-separator {
    color: #6c757d;
    margin: 0 0.25rem;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid #c3e6cb;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.success-icon {
    font-size: 1.5rem;
    color: #28a745;
}

.reset-link-box {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin: 1rem 0;
    word-break: break-all;
    border: 1px solid #dee2e6;
}

.reset-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
}

.reset-link:hover {
    text-decoration: underline;
}

/* 仪表板样式 */
.dashboard-container {
    max-width: 100%;
}

/* 错误页面样式 */
.error-container {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.error-box {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: 2rem;
}

.error-icon .icon-error {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-title {
    color: #343a40;
    margin-bottom: 1rem;
}

.error-detail {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.error-info {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: left;
    margin-bottom: 2rem;
}

.error-info h3 {
    color: #343a40;
    margin-bottom: 1rem;
}

.error-info ul {
    color: #6c757d;
    padding-left: 1.5rem;
}

.error-info li {
    margin-bottom: 0.5rem;
}

.error-footer {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #6c757d;
}

/* 底部样式 */
.footer {
    background: #343a40;
    color: #adb5bd;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 15px;
    }

    .system-monitor-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .system-monitor-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-dashboard-shell {
        width: min(100% - 28px, 1240px);
        padding-top: 18px;
    }

    .admin-dashboard-header {
        align-items: flex-start;
        padding: 22px;
        flex-direction: column;
    }

    .admin-dashboard-account {
        justify-content: flex-start;
    }

    .admin-account-chip {
        margin-right: 0;
    }

    .admin-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
    
    .product-card {
        padding: 1.5rem;
    }
    
    .login-box {
        padding: 2rem;
        margin: 1rem;
    }
    
    .error-box {
        padding: 2rem;
        margin: 1rem;
    }
    
    .error-actions {
        flex-direction: column;
    }
    
    .welcome-section h2 {
        font-size: 2rem;
    }
    
    .welcome-section p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 1rem 0;
    }
    
    .login-box {
        padding: 1.5rem;
    }
    
    .error-box {
        padding: 1.5rem;
    }
    
    .info-section {
        padding: 1.5rem;
    }

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

    .admin-account-chip {
        max-width: 100%;
    }
}

/* Security alert block confirmation */
#block-ip-dialog {
    margin: auto;
    width: min(480px, calc(100vw - 48px));
    box-sizing: border-box;
    padding: 24px;
    border: 1px solid #dee2e6;
    border-radius: 12px;
}
#block-ip-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
#block-ip-dialog p { margin: 12px 0; overflow-wrap: anywhere; }
#block-ip-duration { width: 100%; padding: 8px; margin-top: 8px; }
#security-action-error, #block-ip-error { color: #842029; }
.security-alert-item-actions button:disabled { opacity: 0.55; cursor: not-allowed; }
