* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f0f2f5;
    padding: 20px;
    min-height: 100vh;
}
#login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}
#login-page.hidden {
    display: none;
}
.login-wrapper {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 860px;
    width: 92%;
    overflow: hidden;
    max-height: 90vh;
}
.login-box {
    flex: 1;
    padding: 40px 48px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-box h1 {
    font-size: 22px;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
}
.login-box p {
    font-size: 14px;
    color: #999;
    text-align: center;
    margin-bottom: 24px;
}
.login-box .form-group {
    margin-bottom: 16px;
}
.login-box .form-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}
.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    background: #ffffff;
}
.login-box input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}
.login-box .error {
    color: #ff4d4f;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}
.login-box .error.show {
    display: block;
}
.login-box button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: transform 0.2s;
}
.login-box button:hover {
    transform: scale(1.02);
}
.login-box .hint {
    text-align: center;
    font-size: 12px;
    color: #bbb;
    margin-top: 16px;
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
    line-height: 1.8;
}
.login-box .hint span {
    color: #667eea;
    font-weight: 500;
}
.changelog-panel {
    width: 320px;
    min-width: 280px;
    background: #f8f9fc;
    padding: 24px 20px;
    border-right: 1px solid #e8ecf1;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}
.changelog-panel .panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.changelog-panel .panel-subtitle {
    font-size: 12px;
    color: #999;
    margin-bottom: 16px;
}
.changelog-panel .changelog-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}
.changelog-panel .changelog-list::-webkit-scrollbar {
    width: 4px;
}
.changelog-panel .changelog-list::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}
.changelog-item {
    background: #ffffff;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #667eea;
    position: relative;
}
.changelog-item .cl-version {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.changelog-item .cl-time {
    font-size: 11px;
    color: #999;
    float: right;
}
.changelog-item .cl-author {
    font-size: 11px;
    color: #667eea;
    margin-top: 2px;
}
.changelog-item .cl-content {
    font-size: 13px;
    color: #555;
    margin-top: 4px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.changelog-item .cl-actions {
    margin-top: 6px;
    display: flex;
    gap: 6px;
}
.changelog-item .cl-actions button {
    padding: 2px 8px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
}
.changelog-item .cl-actions .cl-edit {
    background: #faad14;
    color: #ffffff;
}
.changelog-item .cl-actions .cl-delete {
    background: #ff4d4f;
    color: #ffffff;
}
.changelog-empty {
    text-align: center;
    color: #ccc;
    font-size: 14px;
    padding: 30px 0;
}
.changelog-panel .add-log-btn {
    margin-top: 12px;
    padding: 8px 0;
    width: 100%;
    background: #667eea;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    display: none;
}
.changelog-panel .add-log-btn:hover {
    background: #5a6fd6;
}
.changelog-panel .add-log-btn.show {
    display: block;
}
#main-page {
    max-width: 1400px;
    margin: 0 auto;
}
#main-page.hidden {
    display: none;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.header h1 {
    font-size: 20px;
    color: #333;
}
.header h1 span {
    color: #667eea;
}
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}
.header-right .user-info {
    background: #f0f2f5;
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 13px;
    color: #333;
}
.header-right .user-info strong {
    color: #667eea;
}
.header-right .add-ticket-btn {
    padding: 8px 18px;
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}
.header-right .add-ticket-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.4);
}
.header-right .logout-btn {
    padding: 6px 16px;
    background: #ff4d4f;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.header-right .logout-btn:hover {
    background: #e04345;
}
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.stat-card {
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.stat-card .number {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}
.stat-card .label {
    font-size: 14px;
    color: #999;
    margin-top: 4px;
}
.stat-card.pending .number {
    color: #faad14;
}
.stat-card.resolved .number {
    color: #52c41a;
}
.stat-card.total .number {
    color: #667eea;
}
.tab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}
.tab-bar button {
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    background: #f5f6fa;
    color: #666;
}
.tab-bar button:hover {
    background: #e8e9f0;
}
.tab-bar button.active {
    background: #667eea;
    color: #ffffff;
}
.tab-bar button .badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 0 8px;
    font-size: 11px;
    margin-left: 4px;
}
.tab-bar button.active .badge {
    background: rgba(255, 255, 255, 0.25);
}
.toolbar,
#requirement-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    align-items: center;
}
#requirement-toolbar {
    display: none;
}
.toolbar select,
.toolbar input,
#requirement-toolbar select,
#requirement-toolbar input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
}
.toolbar select:focus,
.toolbar input:focus,
#requirement-toolbar select:focus,
#requirement-toolbar input:focus {
    border-color: #667eea;
}
.toolbar .search-input,
#requirement-toolbar .search-input {
    flex: 1;
    min-width: 150px;
}
.toolbar .refresh-btn,
#requirement-toolbar .refresh-btn {
    padding: 8px 20px;
    background: #667eea;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.toolbar .refresh-btn:hover,
#requirement-toolbar .refresh-btn:hover {
    background: #5a6fd6;
}
.toolbar .forward-btn {
    padding: 8px 20px;
    background: #faad14;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}
.toolbar .forward-btn:hover {
    background: #e8a00a;
    transform: scale(1.02);
}
.toolbar .forward-btn:disabled {
    background: #d9d9d9;
    color: #999;
    cursor: not-allowed;
    transform: none;
}
.toolbar .export-btn {
    padding: 8px 16px;
    background: #13c2c2;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    display: none;
}
.toolbar .export-btn:hover {
    background: #0ea5a5;
    transform: scale(1.02);
}
.toolbar .export-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 160px;
    overflow: hidden;
    margin-top: 4px;
}
.toolbar .export-dropdown.active {
    display: block;
}
.toolbar .export-dropdown button {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: #ffffff;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    transition: background 0.2s;
}
.toolbar .export-dropdown button:hover {
    background: #f5f7fa;
}
.toolbar .export-dropdown button .icon {
    margin-right: 8px;
}
.toolbar .export-wrapper {
    position: relative;
    display: inline-block;
}
.toolbar .import-btn {
    padding: 8px 16px;
    background: #722ed1;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    display: none;
}
.toolbar .import-btn:hover {
    background: #5b1fa8;
    transform: scale(1.02);
}
.toolbar .auto-refresh {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}
.toolbar .auto-refresh .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #52c41a;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}
.list-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}
.list-header {
    display: grid;
    grid-template-columns: 40px 90px 120px 1fr 80px 80px 90px 90px 150px 100px;
    padding: 12px 16px;
    background: #fafafa;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}
.list-header .checkbox-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}
.list-header .checkbox-cell input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}
.requirement-list-header {
    display: grid;
    grid-template-columns: 140px 75px 75px 1fr 90px 110px 140px 80px;
    padding: 12px 16px;
    background: #fafafa;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    gap: 6px;
}
.list-body {
    max-height: 55vh;
    overflow-y: auto;
}
.list-body::-webkit-scrollbar {
    width: 6px;
}
.list-body::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}
.question-item {
    display: grid;
    grid-template-columns: 40px 90px 120px 1fr 80px 80px 90px 90px 150px 100px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    align-items: center;
    font-size: 14px;
    transition: background 0.2s;
}
.question-item:hover {
    background: #f8f9ff;
}
.question-item .checkbox-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}
.question-item .checkbox-cell input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}
.question-item .id {
    font-family: monospace;
    font-size: 12px;
    color: #999;
}
.question-item .product {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 12px;
    text-align: center;
    display: inline-block;
    width: fit-content;
}
.question-item .desc {
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s;
}
.question-item .desc.green {
    color: #52c41a;
    font-weight: 500;
}
.question-item .priority {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 12px;
    text-align: center;
}
.question-item .priority.high {
    background: #fff1f0;
    color: #ff4d4f;
}
.question-item .priority.low {
    background: #f6ffed;
    color: #52c41a;
}
.question-item .status {
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 12px;
    text-align: center;
}
.question-item .status.pending {
    background: #fff7e6;
    color: #faad14;
}
.question-item .status.resolved {
    background: #f6ffed;
    color: #52c41a;
}
.question-item .follower {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}
.question-item .created-time {
    font-size: 12px;
    color: #999;
}
.question-item .actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.question-item .actions button {
    padding: 3px 8px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.question-item .actions button:hover {
    opacity: 0.8;
}
.btn-resolve {
    background: #52c41a;
    color: #ffffff;
}
.btn-edit {
    background: #faad14;
    color: #ffffff;
}
.btn-delete {
    background: #ff4d4f;
    color: #ffffff;
}
.btn-reopen {
    background: #faad14;
    color: #ffffff;
}
.btn-reply {
    background: #1890ff;
    color: #ffffff;
}
.btn-view {
    background: #667eea;
    color: #ffffff;
}
.requirement-item {
    display: grid;
    grid-template-columns: 140px 75px 75px 1fr 90px 110px 140px 80px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    align-items: center;
    font-size: 14px;
    transition: background 0.2s;
    gap: 6px;
}
.requirement-item:hover {
    background: #f8f9ff;
}
.requirement-item .req-id {
    font-family: monospace;
    font-size: 12px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.requirement-item>span:nth-child(2),
.requirement-item>span:nth-child(3) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.requirement-item .req-content {
    color: #1890ff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}
.requirement-item .req-content:hover {
    color: #40a9ff;
    text-decoration: underline;
}
.requirement-item .req-status-select {
    padding: 2px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    background: #ffffff;
    width: 100%;
    max-width: 75px;
}
.requirement-item .req-status-select:focus {
    border-color: #667eea;
}
.requirement-item .req-scheduled-input {
    padding: 2px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    width: 100%;
    max-width: 120px;
    outline: none;
}
.requirement-item .req-scheduled-input:focus {
    border-color: #667eea;
}
.requirement-item .req-actions {
    display: flex;
    gap: 3px;
    flex-wrap: nowrap;
}
.requirement-item .req-actions button {
    padding: 2px 6px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.requirement-item .req-actions button:hover {
    opacity: 0.8;
}
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #ccc;
    font-size: 16px;
}
.empty-state .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active {
    display: flex;
}
.modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    width: 520px;
    max-width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 18px;
}
.modal .form-group {
    margin-bottom: 16px;
}
.modal .form-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}
.modal .form-group label .required {
    color: #ff4d4f;
}
.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}
.modal .form-group input:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus {
    border-color: #667eea;
}
.modal .form-group textarea {
    resize: vertical;
    min-height: 60px;
}
.modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.modal .modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.modal .modal-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.modal .modal-actions button:hover {
    opacity: 0.85;
}
.modal .btn-save {
    background: #52c41a;
    color: #ffffff;
}
.modal .btn-cancel {
    background: #f0f0f0;
    color: #666;
}
.modal .btn-forward {
    background: #faad14;
    color: #ffffff;
}
.modal .btn-danger {
    background: #ff4d4f;
    color: #ffffff;
}
.modal-reply {
    width: 720px;
    max-width: 94%;
    padding: 36px 40px;
}
.modal-reply .reply-ticket-info {
    display: flex;
    gap: 16px;
    padding: 14px 18px;
    background: #f5f7fa;
    border-radius: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid #e8ecf1;
}
.modal-reply .reply-ticket-info .label {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    font-weight: 500;
}
.modal-reply .reply-ticket-info .ticket-id {
    font-weight: 600;
    color: #333;
    font-family: monospace;
    font-size: 15px;
    background: #ffffff;
    padding: 2px 12px;
    border-radius: 4px;
}
.modal-reply .reply-ticket-info .ticket-desc {
    color: #333;
    font-size: 14px;
    flex: 1;
    min-width: 120px;
    word-break: break-all;
    background: #ffffff;
    padding: 4px 14px;
    border-radius: 4px;
    line-height: 1.6;
}
.modal-reply .reply-ticket-info .ticket-desc .desc-label {
    color: #999;
    font-weight: normal;
}
.modal-reply .reply-timeline-wrapper {
    border: 1px solid #e8ecf1;
    border-radius: 10px;
    padding: 16px 18px;
    background: #fafbfc;
    margin-bottom: 16px;
    max-height: 320px;
    min-height: 120px;
    overflow-y: auto;
}
.modal-reply .reply-timeline-wrapper .timeline-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.modal-reply .reply-timeline-empty {
    text-align: center;
    color: #bbb;
    font-size: 14px;
    padding: 24px 0;
}
.modal-reply .reply-timeline-item {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    border-left: 4px solid #667eea;
    margin-bottom: 10px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.modal-reply .reply-timeline-item:last-child {
    margin-bottom: 0;
}
.modal-reply .reply-timeline-item .reply-content {
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.6;
}
.modal-reply .reply-timeline-item .reply-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.modal-reply .reply-timeline-item .reply-meta .reply-author {
    color: #667eea;
    font-weight: 600;
}
.reply-images {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.reply-images .reply-img-thumb {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e8ecf1;
    transition: transform 0.2s;
}
.reply-images .reply-img-thumb:hover {
    transform: scale(1.05);
}
.reply-images .reply-img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.modal-reply .reply-input-area textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    font-family: inherit;
    resize: vertical;
    min-height: 90px;
    transition: border-color 0.3s;
    line-height: 1.6;
}
.modal-reply .reply-input-area textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}
.modal-reply .reply-input-area .reply-author-hidden {
    font-size: 13px;
    color: #999;
    margin-top: 6px;
    text-align: right;
}
.modal-reply .reply-input-area .reply-author-hidden span {
    color: #667eea;
    font-weight: 600;
}
.modal-reply .modal-actions {
    display: flex;
    gap: 14px;
    margin-top: 20px;
}
.modal-reply .modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.modal-reply .modal-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.modal-reply .modal-actions .btn-save {
    background: #52c41a;
    color: #ffffff;
}
.modal-reply .modal-actions .btn-cancel {
    background: #f0f0f0;
    color: #666;
}
.modal-view {
    width: 520px;
    max-width: 92%;
    padding: 28px 32px;
}
.modal-view .view-item {
    margin-bottom: 16px;
}
.modal-view .view-item .view-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 4px;
}
.modal-view .view-item .view-value {
    font-size: 15px;
    color: #333;
    padding: 8px 12px;
    background: #f5f7fa;
    border-radius: 6px;
    word-break: break-all;
    line-height: 1.6;
}
.modal-view .view-item .view-value.remark {
    background: #fffbe6;
    border: 1px solid #ffe58f;
}
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 16px;
}
.stat-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #667eea;
    transition: all 0.2s;
}
.stat-item:hover {
    background: #f0f1f5;
    transform: translateX(4px);
}
.stat-item .product-name {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}
.stat-item .product-count {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    background: #ffffff;
    padding: 2px 12px;
    border-radius: 12px;
}
.stat-item .product-count.zero {
    color: #999;
}
.stat-total {
    grid-column: 1 / -1;
    background: #e8e9f0;
    border-left-color: #333;
}
.stat-total .product-count {
    color: #333;
}
.stat-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}
.requirement-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding: 16px 16px 8px 16px;
}
.req-stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
    border-left: 4px solid #667eea;
}
.req-stat-card .req-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}
.req-stat-card .req-stat-label {
    font-size: 12px;
    color: #999;
}
.import-modal .file-drop-zone {
    border: 2px dashed #d9d9d9;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafbfc;
}
.import-modal .file-drop-zone:hover,
.import-modal .file-drop-zone.dragover {
    border-color: #667eea;
    background: #f0f2ff;
}
.import-modal .file-drop-zone .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
}
.import-modal .file-drop-zone .text {
    font-size: 16px;
    color: #666;
}
.import-modal .file-drop-zone .hint {
    font-size: 12px;
    color: #bbb;
    margin-top: 4px;
}
.import-modal .file-info {
    display: none;
    padding: 12px 16px;
    background: #f6ffed;
    border-radius: 8px;
    margin-top: 12px;
    border: 1px solid #b7eb8f;
}
.import-modal .file-info .filename {
    font-weight: 600;
    color: #52c41a;
}
.import-modal .preview-table {
    display: none;
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
}
.import-modal .preview-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.import-modal .preview-table th {
    background: #f5f7fa;
    padding: 6px 10px;
    text-align: left;
    border-bottom: 2px solid #e8ecf1;
    position: sticky;
    top: 0;
    z-index: 2;
}
.import-modal .preview-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
}
.import-modal .preview-table td:first-child {
    font-weight: 500;
    color: #667eea;
    font-family: monospace;
}
.import-modal .progress-bar {
    display: none;
    margin-top: 12px;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}
.import-modal .progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #52c41a, #389e0d);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s;
}
.import-modal .import-result {
    display: none;
    margin-top: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}
.import-modal .import-result .error-item {
    color: #ff4d4f;
    padding: 2px 0;
    font-size: 12px;
}
.import-modal .import-result .success-item {
    color: #52c41a;
    padding: 2px 0;
    font-size: 12px;
}
.import-modal .import-result .detail-list {
    max-height: 120px;
    overflow-y: auto;
    margin-top: 8px;
    font-size: 12px;
}
.image-upload-area {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafbfc;
    margin-bottom: 12px;
}
.image-upload-area:hover {
    border-color: #667eea;
    background: #f0f2ff;
}
.image-upload-area .upload-hint {
    font-size: 13px;
    color: #999;
}
.image-upload-area .upload-hint .icon {
    font-size: 28px;
    display: block;
    margin-bottom: 4px;
}
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.image-preview-item {
    position: relative;
    border: 1px solid #e8ecf1;
    border-radius: 6px;
    overflow: hidden;
    background: #fafbfc;
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform 0.2s;
}
.image-preview-item:hover {
    transform: scale(1.02);
}
.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-preview-item .image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(255, 77, 79, 0.85);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    transition: all 0.2s;
    z-index: 2;
}
.image-preview-item .image-remove:hover {
    background: #ff4d4f;
    transform: scale(1.1);
}
.image-preview-item .image-index {
    position: absolute;
    bottom: 2px;
    left: 2px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    padding: 0 6px;
    border-radius: 3px;
    font-size: 10px;
}
.image-upload-progress {
    display: none;
    margin-top: 8px;
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
}
.image-upload-progress.active {
    display: block;
}
.image-upload-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s;
}
.image-upload-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.image-upload-actions .upload-btn {
    padding: 6px 16px;
    background: #667eea;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}
.image-upload-actions .upload-btn:hover {
    background: #5a6fd6;
}
.image-upload-actions .upload-btn:disabled {
    background: #d9d9d9;
    color: #999;
    cursor: not-allowed;
}
.image-upload-actions .count-hint {
    font-size: 12px;
    color: #999;
}
.image-upload-actions .count-hint .current {
    color: #667eea;
    font-weight: 600;
}
.image-upload-actions .count-hint .max {
    color: #999;
}
.image-upload-actions .count-hint.warning .current {
    color: #faad14;
}
.image-upload-actions .count-hint.danger .current {
    color: #ff4d4f;
}
.question-item .has-image {
    color: #667eea;
    font-size: 11px;
    display: inline-block;
    margin-left: 4px;
    cursor: pointer;
}
#image-preview-modal {
    z-index: 10001;
    background: rgba(0, 0, 0, 0.85);
}
#image-preview-modal img {
    transition: transform 0.3s ease;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
}
#image-preview-modal img.zoomed {
    transform: scale(1.5);
    cursor: zoom-in;
}
.preview-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: none;
}
.preview-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.preview-close-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #ffffff;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10002;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s;
}
.preview-close-btn:hover {
    transform: rotate(90deg);
}
.preview-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 20px;
    border-radius: 20px;
    display: none;
}
.reply-original-images {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f5f7fa;
    border-radius: 8px;
    border: 1px solid #e8ecf1;
}
.reply-original-images .title {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    margin-bottom: 6px;
}
.reply-original-images .images-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.reply-original-images .no-image {
    color: #ccc;
    font-size: 13px;
    padding: 4px 0;
}
@media (max-width: 1200px) {
    .list-header {
        grid-template-columns: 35px 80px 100px 1fr 60px 70px 80px 80px 120px 80px;
        font-size: 11px;
        padding: 10px 12px;
    }
    .question-item {
        grid-template-columns: 35px 80px 100px 1fr 60px 70px 80px 80px 120px 80px;
        padding: 10px 12px;
        font-size: 12px;
    }
    .requirement-list-header {
        grid-template-columns: 120px 65px 65px 1fr 80px 90px 120px 70px;
        font-size: 11px;
        gap: 4px;
    }
    .requirement-item {
        grid-template-columns: 120px 65px 65px 1fr 80px 90px 120px 70px;
        font-size: 12px;
        gap: 4px;
    }
    .requirement-item .req-scheduled-input {
        max-width: 100px;
    }
    .requirement-item .req-status-select {
        max-width: 65px;
    }
}
@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
        max-height: 95vh;
        border-radius: 12px;
    }
    .changelog-panel {
        width: 100%;
        min-width: unset;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid #e8ecf1;
        padding: 16px;
    }
    .login-box {
        padding: 24px 20px;
    }
    .list-header {
        display: none;
    }
    .question-item {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 16px;
        border-bottom: 2px solid #f0f0f0;
    }
    .question-item .id {
        font-size: 14px;
        font-weight: 600;
        color: #333;
    }
    .question-item .desc {
        white-space: normal;
    }
    .question-item .actions {
        margin-top: 6px;
    }
    .requirement-list-header {
        display: none;
    }
    .requirement-item {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 16px;
        border-bottom: 2px solid #f0f0f0;
    }
    .requirement-item .req-id {
        font-size: 14px;
        font-weight: 600;
        color: #333;
    }
    .requirement-item .req-content {
        white-space: normal;
    }
    .requirement-item .req-scheduled-input {
        max-width: 100%;
    }
    .requirement-item .req-status-select {
        max-width: 100%;
    }
    .modal {
        padding: 20px;
    }
    .modal .form-row {
        grid-template-columns: 1fr;
    }
    .modal-reply {
        padding: 24px 20px;
    }
    .modal-reply .reply-ticket-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .header h1 {
        font-size: 17px;
    }
    .stats {
        grid-template-columns: repeat(3, 1fr);
    }
    .stat-card .number {
        font-size: 24px;
    }
    .tab-bar {
        flex-wrap: wrap;
    }
    .tab-bar button {
        flex: 1;
        padding: 6px 12px;
        font-size: 12px;
        min-width: 60px;
    }
    .statistics-grid {
        grid-template-columns: 1fr 1fr;
    }
    .requirement-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    .toolbar,
    #requirement-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar .search-input,
    #requirement-toolbar .search-input {
        min-width: unset;
    }
    .header {
        flex-direction: column;
        text-align: center;
    }
}
@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr 1fr;
    }
    .statistics-grid {
        grid-template-columns: 1fr;
    }
    .requirement-stats {
        grid-template-columns: 1fr 1fr;
    }
    .modal-reply {
        padding: 16px;
        width: 98%;
    }
    .modal-reply .reply-timeline-wrapper {
        max-height: 200px;
        min-height: 80px;
        padding: 12px;
    }
    .modal-view {
        padding: 20px;
    }
    .login-box {
        padding: 24px;
    }
    .image-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
    .preview-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
    .preview-close-btn {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }
}

/* ===== 弹窗样式（独立于 style.css 已有，确保存在） ===== */
.notification-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 99998;
    border: 1px solid #e8ecf1;
    animation: slideInRight 0.3s ease;
    margin-bottom: 8px;
    overflow: hidden;
}
.notification-modal .notif-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 16px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.notification-modal .notif-header .notif-title {
    font-size: 14px;
    font-weight: 600;
}
.notification-modal .notif-header .notif-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
}
.notification-modal .notif-body {
    padding: 14px 16px;
}
.notification-modal .notif-body .notif-ticket {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}
.notification-modal .notif-body .notif-action {
    font-size: 13px;
    color: #666;
    margin: 4px 0;
}
.notification-modal .notif-body .notif-desc {
    font-size: 13px;
    color: #333;
    background: #f5f7fa;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 6px 0 10px 0;
    line-height: 1.5;
}
.notification-modal .notif-body .notif-time {
    font-size: 11px;
    color: #999;
}
.notification-modal .notif-body .notif-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.notification-modal .notif-body .notif-actions button {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}
.notification-modal .notif-body .notif-actions .btn-view {
    background: #52c41a;
    color: white;
}
.notification-modal .notif-body .notif-actions .btn-close {
    background: #f0f0f0;
    color: #666;
}
.notification-modal .notif-body .notif-hint {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
    font-size: 11px;
    color: #ccc;
}
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}