/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ThinkPHP 经典配色方案 */
    --primary: #1f2d3d;
    --primary-light: #2c3e50;
    --primary-dark: #151f2b;
    --accent: #409eff;
    --accent-hover: #66b1ff;
    --accent-active: #3a8ee6;
    
    /* 侧边栏 - ThinkPHP深色主题 */
    --sidebar-bg: #1f2d3d;
    --sidebar-item-hover: #001528;
    --sidebar-item-active: #409eff;
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
    
    /* 辅助色 - ThinkPHP标准色 */
    --success: #67c23a;
    --danger: #f56c6c;
    --warning: #e6a23c;
    --info: #909399;
    
    /* 中性色 */
    --text-primary: #303133;
    --text-regular: #606266;
    --text-secondary: #909399;
    --text-placeholder: #c0c4cc;
    --text-white: #ffffff;
    --border: #dcdfe6;
    --border-light: #e4e7ed;
    --border-lighter: #ebeef5;
    --bg-gray: #f5f7fa;
    --bg-white: #ffffff;
    
    /* 间距 */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* 圆角 */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* 过渡 */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Microsoft YaHei', sans-serif;
    color: var(--text-primary);
    background: var(--bg-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 64px;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    stroke-width: 2;
    color: var(--accent);
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    white-space: nowrap;
    opacity: 1;
    transition: var(--transition);
}

.sidebar.collapsed .sidebar-title {
    opacity: 0;
    width: 0;
}

/* 侧边栏导航 */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-md) 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
}

.nav-section {
    margin-bottom: var(--space-lg);
}

.nav-section-title {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-placeholder);
    font-weight: 600;
    transition: var(--transition);
}

.sidebar.collapsed .nav-section-title {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--text-white);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--sidebar-item-hover);
}

.nav-item.active {
    background: var(--sidebar-item-active);
    color: var(--text-white);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--text-white);
}

.nav-item-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    flex-shrink: 0;
}

.nav-item span {
    white-space: nowrap;
    opacity: 1;
    transition: var(--transition);
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
}

.nav-item-static {
    padding: var(--space-md) var(--space-lg);
    color: var(--text-white);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.nav-item-content {
    flex: 1;
    min-width: 0;
}

.api-status-label {
    font-size: 0.75rem;
    color: var(--text-placeholder);
    margin-bottom: var(--space-xs);
}

.api-status {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    color: var(--text-white);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.sidebar.collapsed .nav-item-content {
    display: none;
}

/* 侧边栏底部 */
.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-md);
}

.sidebar-toggle {
    width: 100%;
    padding: var(--space-sm);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-white);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-toggle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* ==================== 主容器 ==================== */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar.collapsed ~ .main-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}

/* ==================== 顶部导航栏 ==================== */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0 var(--space-xl);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: var(--space-xs);
    cursor: pointer;
    color: var(--text-primary);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.breadcrumb-item {
    color: var(--text-secondary);
}

.breadcrumb-item:last-child {
    color: var(--text-regular);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-placeholder);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.header-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: var(--transition);
    color: var(--text-regular);
    text-decoration: none;
    cursor: pointer;
}

.header-info:hover {
    background: var(--bg-gray);
    color: var(--accent);
}

.header-info:active {
    transform: scale(0.98);
}

.header-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* ==================== 主内容区 ==================== */
.main-content {
    flex: 1;
    padding: var(--space-xl);
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== 卡片组件 ==================== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: var(--space-xl);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.main-search-card {
    border-top: 3px solid var(--accent);
}

.result-card {
    border-left: 4px solid var(--success);
}

.batch-card {
    border-top: 3px solid var(--warning);
}

.card-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.card-body {
    padding: var(--space-xl);
}

/* ==================== 表单组件 ==================== */
/* 旧版表单样式（保留兼容） */
.search-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.search-grid-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 180px 180px;
    gap: var(--space-md);
}

.batch-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.batch-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.batch-right {
    display: flex;
    flex-direction: column;
}

.batch-right .field-textarea {
    min-height: 160px;
    resize: vertical;
}

/* ==================== ThinkPHP风格表单布局 ==================== */
/* 左右分栏布局 */
.tp-layout-split {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
}

.tp-layout-main {
    flex: 1;
    min-width: 0;
}

.tp-layout-sidebar {
    flex: 0 0 280px;
}

/* 表单容器 */
.tp-form-container {
    width: 100%;
}

.tp-form-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
    position: relative;
}

.tp-form-item:last-child {
    margin-bottom: 0;
}

.tp-form-label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    padding-top: 0.625rem;
    width: 100px;
    text-align: right;
    flex-shrink: 0;
    margin-right: var(--space-lg);
}

.tp-form-label .required {
    color: var(--danger);
    margin-right: 4px;
    font-weight: bold;
}

.tp-form-control {
    flex: 1;
    min-width: 0;
}

.tp-form-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
    line-height: 1.5;
}

/* 内联表单组 */
.tp-inline-group {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.tp-inline-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tp-inline-label {
    font-size: 0.875rem;
    color: var(--text-regular);
    white-space: nowrap;
}

/* 上传区域 */
.tp-upload-area {
    margin-bottom: var(--space-sm);
}

/* 小按钮 */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* 按钮组在表单控制器中 */
.tp-form-control .btn {
    margin-right: var(--space-sm);
}

.tp-form-control .btn:last-child {
    margin-right: 0;
}

/* ==================== 信息卡片（右侧辅助区） ==================== */
.tp-info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.tp-info-card:hover {
    box-shadow: var(--shadow-md);
}

.tp-info-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    font-weight: 600;
    font-size: 0.9375rem;
}

.tp-info-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    flex-shrink: 0;
}

.tp-info-card-body {
    padding: var(--space-lg);
}

.tp-info-item {
    margin-bottom: var(--space-md);
}

.tp-info-item:last-child {
    margin-bottom: 0;
}

.tp-info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.tp-info-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: var(--space-xs);
}

.form-field {
    display: flex;
    flex-direction: column;
}

.field-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.field-input,
.field-select,
.field-textarea {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-primary);
}

.field-input,
.field-textarea {
    width: 100%;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.field-input::placeholder,
.field-textarea::placeholder {
    color: var(--text-placeholder);
}

.field-select {
    cursor: pointer;
}

.field-textarea {
    resize: vertical;
    font-family: 'Consolas', 'Monaco', monospace;
    line-height: 1.5;
}

/* ==================== 按钮组件 ==================== */
.button-group {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    padding-top: var(--space-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-regular);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    color: var(--accent);
    border-color: var(--accent-hover);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #85ce61;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #f78989;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-info:hover {
    background: #a6a9ad;
}


/* ==================== 进度条 ==================== */
.progress-container {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: var(--bg-gray);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.progress-title {
    font-weight: 500;
    color: var(--text-primary);
}

.progress-stats {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.progress-bar-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
    border-radius: var(--radius-lg);
}

.progress-percent {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    min-width: 45px;
    text-align: right;
}

/* ==================== 加载状态 ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(2px);
}

.loading-content {
    background: var(--bg-white);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-lg);
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* ==================== 结果展示 ==================== */
.result-content {
    max-height: 600px;
    overflow-y: auto;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.result-table thead {
    background: var(--bg-gray);
    position: sticky;
    top: 0;
    z-index: 10;
}

.result-table th {
    padding: var(--space-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
}

.result-table td {
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.result-table tbody tr {
    transition: var(--transition);
}

.result-table tbody tr:hover {
    background: var(--border-lighter);
}

.result-table tbody tr:last-child td {
    border-bottom: none;
}

/* 结果卡片（移动端） */
.result-cards {
    display: none;
}

.result-card-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    transition: var(--transition);
}

.result-card-item:hover {
    box-shadow: var(--shadow-md);
}

.result-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border-light);
}

.result-card-row {
    display: flex;
    padding: var(--space-sm) 0;
    gap: var(--space-md);
}

.result-card-label {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 120px;
    flex-shrink: 0;
}

.result-card-value {
    color: var(--text-secondary);
    flex: 1;
    word-break: break-all;
}

.result-card-value.empty,
.empty-value {
    color: var(--text-placeholder);
    font-style: italic;
}

/* ==================== Toast提示消息 ==================== */
.toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.9375rem;
    min-width: 300px;
    max-width: 500px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.toast-show {
    opacity: 1;
    transform: translateY(0);
}

.toast-hide {
    opacity: 0;
    transform: translateY(-20px);
}

.toast-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 14px;
}

.toast-message {
    flex: 1;
    word-break: break-word;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-success .toast-icon {
    background: var(--success);
    color: white;
}

.toast-success .toast-message {
    color: var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-error .toast-icon {
    background: var(--danger);
    color: white;
}

.toast-error .toast-message {
    color: var(--danger);
}

.toast-info {
    border-left: 4px solid var(--info);
}

.toast-info .toast-icon {
    background: var(--info);
    color: white;
}

.toast-info .toast-message {
    color: var(--info);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-warning .toast-icon {
    background: var(--warning);
    color: white;
}

.toast-warning .toast-message {
    color: var(--warning);
}

/* ==================== 页脚 ==================== */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ==================== 滚动条样式 ==================== */
.result-content::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.result-content::-webkit-scrollbar-track {
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
}

.result-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-sm);
}

.result-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-placeholder);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    /* 旧版表单响应式 */
    .search-grid {
        grid-template-columns: 1fr;
    }
    
    .search-grid-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .batch-grid {
        grid-template-columns: 1fr;
    }
    
    .batch-left {
        grid-template-columns: 1fr;
    }
    
    .batch-right .field-textarea {
        min-height: 150px;
    }
    
    /* ThinkPHP表单响应式 - 平板 */
    .tp-form-label {
        width: 90px;
        margin-right: var(--space-md);
    }
    
    .tp-layout-sidebar {
        flex: 0 0 240px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-content {
        padding: var(--space-md);
    }
    
    .header {
        padding: 0 var(--space-md);
    }
    
    .breadcrumb {
        font-size: 0.8125rem;
    }
    
    .card-header {
        padding: var(--space-lg);
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }
    
    .card-body {
        padding: var(--space-lg);
    }
    
    .button-group {
        width: 100%;
        flex-direction: column;
    }
    
    .button-group .btn {
        width: 100%;
        justify-content: center;
    }
    
    .search-grid-row {
        grid-template-columns: 1fr;
    }
    
    /* 移动端隐藏表格，显示卡片 */
    .result-table {
        display: none;
    }
    
    .result-cards {
        display: block;
    }
    
    /* ThinkPHP表单响应式 - 移动端 */
    /* 左右分栏变为上下布局 */
    .tp-layout-split {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .tp-layout-sidebar {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .tp-form-item {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: var(--space-lg);
    }
    
    .tp-form-label {
        width: 100%;
        text-align: left;
        padding-top: 0;
        margin-bottom: var(--space-xs);
        margin-right: 0;
    }
    
    .tp-form-control {
        width: 100%;
    }
    
    .tp-inline-group {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-md);
    }
    
    .tp-inline-item {
        width: 100%;
    }
    
    .tp-inline-item input {
        width: 100% !important;
    }
    
    .tp-form-control .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: var(--space-sm);
    }
    
    .tp-form-control .btn:last-child {
        margin-bottom: 0;
    }
}

@media (min-width: 769px) {
    .result-cards {
        display: none;
    }
}

/* ==================== 历史任务管理 ==================== */
.history-toolbar {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    align-items: flex-end;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.history-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: all 0.2s ease;
}

.history-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.1);
}

.history-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.history-item-info {
    flex: 1;
}

.history-item-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.history-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.history-item-type {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.history-item-type.type-web {
    background: #e8f4fd;
    color: var(--primary);
}

.history-item-type.type-app {
    background: #f0f9ff;
    color: #67c23a;
}

.history-item-type.type-mapp {
    background: #fef0f0;
    color: #f56c6c;
}

.history-item-type.type-kapp {
    background: #fdf6ec;
    color: #e6a23c;
}

.history-item-meta {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.history-item-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.history-item-meta svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.history-item-actions {
    display: flex;
    gap: var(--space-sm);
}

.history-item-body {
    display: none;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

.history-item.expanded .history-item-body {
    display: block;
}

.history-item-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.history-stat-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.history-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.history-stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.history-stat-value.success {
    color: var(--success);
}

.history-stat-value.primary {
    color: var(--primary);
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xxl) var(--space-lg);
    text-align: center;
}

.empty-icon {
    width: 64px;
    height: 64px;
    stroke: var(--text-placeholder);
    stroke-width: 1.5;
    margin-bottom: var(--space-md);
}

.empty-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.empty-hint {
    font-size: 0.875rem;
    color: var(--text-placeholder);
}

/* 同步状态指示器 */
.sync-indicator {
    display: inline-flex;
    align-items: center;
    margin-left: var(--space-md);
    font-size: 0.875rem;
    font-weight: normal;
    color: var(--text-secondary);
}

.sync-icon {
    display: inline-block;
    margin-right: var(--space-xs);
    font-size: 1rem;
}

.sync-icon.syncing {
    color: var(--primary);
    animation: rotate 1s linear infinite;
}

.sync-icon.synced {
    color: var(--success);
}

.sync-icon.error {
    color: var(--danger);
}

.sync-icon.offline {
    color: var(--warning);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 历史任务响应式 */
@media (max-width: 768px) {
    .history-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .history-toolbar .form-field {
        max-width: 100% !important;
        width: 100% !important;
    }

    .history-item-header {
        flex-direction: column;
        gap: var(--space-md);
    }

    .history-item-actions {
        width: 100%;
    }

    .history-item-actions .btn {
        flex: 1;
    }

    .history-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }

    .history-item-stats {
        grid-template-columns: 1fr;
    }
}

/* ==================== 辅助类 ==================== */
.text-center {
    text-align: center;
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

/* ==================== 首页样式 ==================== */

/* 欢迎横幅 */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.welcome-content {
    text-align: center;
    color: white;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.welcome-icon {
    width: 48px;
    height: 48px;
    stroke-width: 2;
}

.welcome-desc {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* 功能卡片网格 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.feature-icon.primary {
    background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
}

.feature-icon.success {
    background: linear-gradient(135deg, #67c23a 0%, #85ce61 100%);
}

.feature-icon.info {
    background: linear-gradient(135deg, #909399 0%, #a6a9ad 100%);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
    stroke-width: 2;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.feature-desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

.feature-list {
    list-style: none;
    margin-bottom: var(--space-lg);
    flex-grow: 1;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: var(--space-sm);
    color: var(--text-regular);
    line-height: 1.6;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.feature-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s;
    align-self: flex-start;
}

.feature-btn:hover {
    background: var(--accent-hover);
    transform: translateX(4px);
}

/* 系统特性 */
.system-features {
    margin-bottom: var(--space-2xl);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.feature-item {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    gap: var(--space-md);
    transition: all 0.3s;
}

.feature-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.15);
}

.feature-item-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-item-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
    stroke-width: 2;
}

.feature-item-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.feature-item-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* ==================== 积分确认弹窗 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-container {
    background: white;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 480px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

.modal-header {
    padding: var(--space-lg) var(--space-xl);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.modal-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.modal-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: var(--space-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.modal-body {
    padding: var(--space-xl);
}

.points-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.info-item {
    background: var(--bg-gray);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
}

.info-item label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.info-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-value.highlight {
    color: var(--accent);
}

.points-tip {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: #fff3e0;
    border-left: 4px solid var(--warning);
    border-radius: var(--radius-sm);
}

.points-tip svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    stroke: var(--warning);
    stroke-width: 2;
}

.points-tip span {
    font-size: 0.875rem;
    color: #e65100;
    line-height: 1.5;
}

.modal-footer {
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-gray);
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
}

.modal-btn-cancel {
    background: white;
    color: var(--text-regular);
    border: 1px solid var(--border);
}

.modal-btn-cancel:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.modal-btn-confirm {
    background: var(--accent);
    color: white;
}

.modal-btn-confirm:hover {
    background: var(--accent-hover);
}

.modal-btn-confirm:active {
    background: var(--accent-active);
}

/* 响应式 - 首页 */
@media (max-width: 768px) {
    .welcome-title {
        font-size: 1.75rem;
        flex-direction: column;
    }
    
    .welcome-icon {
        width: 36px;
        height: 36px;
    }
    
    .welcome-desc {
        font-size: 1rem;
    }
    
    .feature-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .points-info {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
        justify-content: center;
    }
}
