/**
 * AIVORA 客户需求管理系统样式
 */

/* ===== 统计卡片行 ===== */
.req-stats-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	margin-bottom: 1.5rem;
}
.req-stat-card {
	background: white;
	border-radius: 12px;
	padding: 1.25rem;
	box-shadow: 0 1px 4px rgba(0,0,0,0.06);
	display: flex;
	align-items: center;
	gap: 1rem;
	transition: box-shadow 0.2s;
}
.req-stat-card:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.req-stat-icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.req-stat-icon.pending { background: #fef3c7; color: #92400e; }
.req-stat-icon.review { background: #dbeafe; color: #1e40af; }
.req-stat-icon.accepted { background: #d1fae5; color: #065f46; }
.req-stat-icon.total { background: #e0e7ff; color: #3730a3; }
.req-stat-info h4 {
	font-size: 1.4rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0;
	line-height: 1;
}
.req-stat-info p {
	font-size: 0.8rem;
	color: #6b7280;
	margin: 0.25rem 0 0;
}

/* ===== 工具栏 ===== */
.req-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}
.req-toolbar-left {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	flex-wrap: wrap;
	flex: 1;
}
.req-search-box {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	background: white;
	transition: border-color 0.2s;
}
.req-search-box:focus-within {
	border-color: #1e3a8a;
	box-shadow: 0 0 0 3px rgba(30,58,138,0.08);
}
.req-search-box svg {
	color: #9ca3af;
	flex-shrink: 0;
}
.req-search-box input {
	border: none;
	outline: none;
	font-size: 0.85rem;
	color: #1a1a1a;
	background: transparent;
	min-width: 160px;
}
.req-toolbar select {
	padding: 0.5rem 0.75rem;
	border: 1.5px solid #e5e7eb;
	border-radius: 8px;
	font-size: 0.85rem;
	outline: none;
	background: white;
	transition: border-color 0.2s;
}
.req-toolbar select:focus {
	border-color: #1e3a8a;
}

/* ===== 卡片列表 ===== */
.req-card-list {
	display: grid;
	gap: 0.75rem;
}
.req-card {
	display: block;
	background: white;
	border-radius: 12px;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 1px 4px rgba(0,0,0,0.06);
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s, transform 0.15s;
	border: 1px solid transparent;
}
.req-card:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,0.1);
	transform: translateY(-1px);
	border-color: #e0e7ff;
}
.req-card-header {
	margin-bottom: 0.75rem;
}
.req-card-title-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.35rem;
}
.req-card-number {
	font-family: 'SF Mono', 'Fira Code', monospace;
	font-size: 0.75rem;
	color: #9ca3af;
	letter-spacing: 0.02em;
}
.req-priority-badge {
	font-size: 0.68rem;
	font-weight: 600;
	padding: 0.1rem 0.45rem;
	border-radius: 4px;
	text-transform: uppercase;
}
.req-priority-badge.critical { background: #fecaca; color: #991b1b; }
.req-priority-badge.high { background: #fef3c7; color: #92400e; }
.req-priority-badge.medium { background: #dbeafe; color: #1e40af; }
.req-priority-badge.low { background: #d1fae5; color: #065f46; }
.req-card-title {
	font-size: 0.95rem;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0;
	line-height: 1.4;
}
.req-card-meta {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.req-card-meta-item {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.8rem;
	color: #6b7280;
}
.req-card-meta-item svg {
	flex-shrink: 0;
}

/* ===== Banner 增强 ===== */
.req-banner-inner {
	max-width: 600px;
	margin: 0 auto;
}
.req-banner-greeting {
	font-size: 0.95rem;
	opacity: 0.9;
	margin-bottom: 0.5rem;
}
.req-banner-greeting strong {
	font-weight: 600;
}

/* ===== 通用 ===== */
.req-page {
    min-height: 100vh;
    background: #f8f9fb;
    padding-top: 80px;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.req-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem clamp(1rem, 3vw, 2rem);
}

.req-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #0ea5e9 100%);
    color: white;
    padding: 3rem clamp(1.5rem, 4vw, 4rem) 2rem;
    text-align: center;
}
.req-banner h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.req-banner p {
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    opacity: 0.85;
}

/* ===== 多步表单 ===== */
.req-form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 2.5rem;
    margin-top: -2rem;
    position: relative;
    z-index: 2;
}

.req-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    position: relative;
}
.req-progress-bar::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #e5e7eb;
    z-index: 0;
}
.req-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
}
.req-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}
.req-progress-step.active .req-step-circle {
    background: #1e3a8a;
    color: white;
}
.req-progress-step.completed .req-step-circle {
    background: #10b981;
    color: white;
}
.req-step-label {
    font-size: 0.78rem;
    color: #9ca3af;
    text-align: center;
    transition: color 0.3s;
}
.req-progress-step.active .req-step-label,
.req-progress-step.completed .req-step-label {
    color: #1e3a8a;
    font-weight: 500;
}

.req-form-step { display: none; }
.req-form-step.active { display: block; }

.req-form-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f4ff;
}

.req-field {
    margin-bottom: 1.25rem;
}
.req-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.4rem;
}
.req-field label .req-required {
    color: #ef4444;
    margin-left: 2px;
}

.req-field input[type="text"],
.req-field input[type="email"],
.req-field input[type="tel"],
.req-field input[type="date"],
.req-field select,
.req-field textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1a1a1a;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.req-field input:focus,
.req-field select:focus,
.req-field textarea:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30,58,138,0.1);
}
.req-field textarea {
    min-height: 100px;
    resize: vertical;
}
.req-field input.error,
.req-field select.error,
.req-field textarea.error {
    border-color: #ef4444;
}
.req-field-error {
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 0.3rem;
    display: none;
}
.req-field-error.show {
    display: block;
}

.req-checkbox-group,
.req-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}
.req-checkbox-group label,
.req-radio-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400;
    cursor: pointer;
}

.req-file-upload {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.req-file-upload:hover {
    border-color: #1e3a8a;
    background: #f8faff;
}
.req-file-upload input[type="file"] {
    display: none;
}
.req-file-hint {
    font-size: 0.82rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}
.req-file-list {
    margin-top: 1rem;
}
.req-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #f0f4ff;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}
.req-file-remove {
    color: #ef4444;
    cursor: pointer;
    font-weight: bold;
    background: none;
    border: none;
    font-size: 1rem;
}

.req-form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.req-btn {
    padding: 0.7rem 2rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.req-btn svg {
    flex-shrink: 0;
}
.req-btn-primary {
    background: #1e3a8a;
    color: white;
}
.req-btn-primary:hover {
    background: #1e40af;
}
.req-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}
.req-btn-secondary:hover {
    background: #e5e7eb;
}
.req-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== 列表表格 ===== */
.req-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.req-table th {
    background: #f8f9fb;
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.req-table td {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    color: #374151;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.req-table tbody tr:hover {
    background: #fafbfc;
}
.req-table .req-col-actions {
    white-space: nowrap;
}

/* 状态标签 */
.req-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 500;
}
.req-status-pending { background: #fef3c7; color: #92400e; }
.req-status-review { background: #dbeafe; color: #1e40af; }
.req-status-accepted { background: #d1fae5; color: #065f46; }
.req-status-evaluating { background: #e0e7ff; color: #3730a3; }
.req-status-scheduled { background: #fce7f3; color: #9d174d; }
.req-status-implementing { background: #bfdbfe; color: #1e3a8a; }
.req-status-completed { background: #a7f3d0; color: #065f46; }
.req-status-archived { background: #e5e7eb; color: #374151; }
.req-status-rejected { background: #fecaca; color: #991b1b; }
.req-status-suspended { background: #fed7aa; color: #9a3412; }

/* 优先级 */
.req-priority-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.4rem;
}
.req-priority-high { background: #ef4444; }
.req-priority-critical { background: #dc2626; }
.req-priority-medium { background: #f59e0b; }
.req-priority-low { background: #10b981; }

/* 筛选栏 */
.req-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: center;
}
.req-filter-bar input,
.req-filter-bar select {
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
    background: white;
}
.req-filter-bar input:focus,
.req-filter-bar select:focus {
    border-color: #1e3a8a;
}
.req-filter-bar input[type="text"] {
    min-width: 200px;
}

/* 分页 */
.req-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.req-pagination button {
    padding: 0.4rem 0.8rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.req-pagination button:hover:not(:disabled) {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}
.req-pagination button.active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}
.req-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== 详情页 ===== */
.req-detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.req-detail-main,
.req-detail-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 1.5rem;
}

.req-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}
.req-detail-number {
    font-size: 0.85rem;
    color: #9ca3af;
    font-family: monospace;
}

.req-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.req-info-item {
    padding: 0.75rem;
    background: #f8f9fb;
    border-radius: 8px;
}
.req-info-item label {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}
.req-info-item span {
    font-size: 0.9rem;
    color: #1a1a1a;
    font-weight: 500;
}
.req-info-item.full-width {
    grid-column: 1 / -1;
}

/* 时间线 */
.req-timeline {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}
.req-timeline h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.req-timeline-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    position: relative;
}
.req-timeline-item::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 20px;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}
.req-timeline-item:last-child::before {
    display: none;
}
.req-timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1e3a8a;
    flex-shrink: 0;
    margin-top: 3px;
}
.req-timeline-content {
    flex: 1;
}
.req-timeline-content strong {
    font-size: 0.85rem;
    color: #1a1a1a;
}
.req-timeline-content small {
    display: block;
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 0.15rem;
}

/* 评论区 */
.req-comments {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}
.req-comments h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.req-comment {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f8f8f8;
}
.req-comment:last-of-type {
    border-bottom: none;
}
.req-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}
.req-comment-body {
    flex: 1;
}
.req-comment-body strong {
    font-size: 0.85rem;
    color: #1a1a1a;
}
.req-comment-body small {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-left: 0.5rem;
}
.req-comment-body p {
    font-size: 0.88rem;
    color: #374151;
    margin: 0.3rem 0 0;
}

.req-comment-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.req-comment-form input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
}
.req-comment-form input:focus {
    border-color: #1e3a8a;
}
.req-comment-form button {
    padding: 0.5rem 1rem;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}

/* 内部备注 */
.req-internal-notes {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}
.req-internal-notes h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.req-note {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0 8px 8px 0;
}
.req-note-author {
    font-size: 0.78rem;
    color: #92400e;
    font-weight: 500;
}
.req-note-date {
    font-size: 0.72rem;
    color: #b45309;
    margin-left: 0.5rem;
}
.req-note-content {
    font-size: 0.85rem;
    color: #78350f;
    margin-top: 0.3rem;
}

/* 侧边栏操作 */
.req-sidebar-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}
.req-sidebar-section:last-child {
    border-bottom: none;
}
.req-sidebar-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1e3a8a;
}
.req-sidebar-section select,
.req-sidebar-section input {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    outline: none;
}
.req-sidebar-section select:focus,
.req-sidebar-section input:focus {
    border-color: #1e3a8a;
}
.req-sidebar-btn {
    width: 100%;
    padding: 0.6rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.req-sidebar-btn-primary {
    background: #1e3a8a;
    color: white;
}
.req-sidebar-btn-primary:hover {
    background: #1e40af;
}

/* 附件列表 */
.req-file-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8f9fb;
    border-radius: 6px;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    color: #1e3a8a;
    text-decoration: none;
    transition: background 0.2s;
}
.req-file-link:hover {
    background: #e8f0fe;
}

.req-action-link {
    color: #1e3a8a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}
.req-action-link:hover {
    color: #0ea5e9;
}

/* 通知 */
.req-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    z-index: 10000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
}
.req-notification.show {
    transform: translateX(0);
}
.req-notification.success { background: #10b981; }
.req-notification.error { background: #ef4444; }
.req-notification.info { background: #3b82f6; }

/* 加载/空状态 */
.req-loading {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
}
.req-loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e5e7eb;
    border-top-color: #1e3a8a;
    border-radius: 50%;
    animation: req-spin 0.8s linear infinite;
    margin-top: 0.5rem;
}
@keyframes req-spin {
    to { transform: rotate(360deg); }
}

.req-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
}
.req-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* 返回导航 */
.req-back-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e3a8a;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    cursor: pointer;
    text-decoration: none;
}
.req-back-nav:hover { color: #0ea5e9; }
.req-back-nav svg { width: 18px; height: 18px; }

/* 响应式 */
@media (max-width: 992px) {
	.req-stats-row {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 768px) {
	.req-stats-row {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}
	.req-stat-card {
		padding: 1rem;
	}
	.req-stat-icon {
		width: 36px;
		height: 36px;
	}
	.req-stat-info h4 {
		font-size: 1.1rem;
	}
	.req-toolbar {
		flex-direction: column;
		align-items: stretch;
	}
	.req-toolbar-left {
		flex-direction: column;
		align-items: stretch;
	}
	.req-search-box input {
		min-width: unset;
		width: 100%;
	}
	.req-toolbar .req-btn {
		justify-content: center;
	}
	.req-detail-grid {
		grid-template-columns: 1fr;
	}
	.req-info-grid {
		grid-template-columns: 1fr;
	}
	.req-filter-bar {
		flex-direction: column;
		align-items: stretch;
	}
	.req-filter-bar input[type="text"] {
		min-width: unset;
	}
	.req-form-card {
		padding: 1.5rem;
	}
	.req-table {
		display: block;
		overflow-x: auto;
	}
	.req-card {
		padding: 1rem;
	}
}
@media (max-width: 480px) {
	.req-stats-row {
		grid-template-columns: 1fr 1fr;
		gap: 0.5rem;
	}
	.req-stat-card {
		padding: 0.75rem;
		gap: 0.75rem;
	}
	.req-stat-icon {
		width: 32px;
		height: 32px;
		border-radius: 8px;
	}
	.req-stat-info h4 {
		font-size: 1rem;
	}
	.req-stat-info p {
		font-size: 0.72rem;
	}
	.req-card-meta {
		flex-wrap: wrap;
		gap: 0.5rem;
	}
}
