/* 软著申请管理系统 - 全局样式 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
}

.app-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 16px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.app-header h1 { font-size: 22px; font-weight: 600; }
.app-header p { font-size: 13px; opacity: 0.75; margin-top: 4px; }

.app-nav {
    display: flex;
    gap: 4px;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    overflow-x: auto;
    flex-wrap: wrap;
}

.nav-item {
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    white-space: nowrap;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.nav-item:hover { background: #f0f5ff; color: #1890ff; }
.nav-item.active {
    background: #1890ff;
    color: #fff;
    font-weight: 600;
}

.app-main {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 20px 40px;
}

.module { display: none; }
.module.active { display: block; }

.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 24px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 17px;
    color: #1a1a2e;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid #e8e8e8;
}

.card h3 {
    font-size: 14px;
    color: #555;
    margin: 16px 0 8px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group.full { flex: 0 0 100%; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.form-group label .req { color: #ff4d4f; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24,144,255,0.15);
}

.form-group textarea { resize: vertical; min-height: 80px; }
.hint { font-size: 11px; color: #999; margin-top: 3px; }

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary { background: #1890ff; color: #fff; }
.btn-primary:hover { background: #40a9ff; }
.btn-primary:disabled { background: #91caff; cursor: not-allowed; }

.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #73d13d; }

.btn-warning { background: #faad14; color: #fff; }
.btn-warning:hover { background: #ffc53d; }

.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #ff7875; }

.btn-outline {
    background: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
}
.btn-outline:hover { border-color: #1890ff; color: #1890ff; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

.msg {
    padding: 10px 14px;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 13px;
}
.msg.ok { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.msg.err { background: #fff2f0; border: 1px solid #ffccc7; color: #cf1322; white-space: pre-wrap; }
.msg.info { background: #e6f7ff; border: 1px solid #91d5ff; color: #096dd9; }

.table-wrap { overflow-x: auto; margin-top: 12px; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th, td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th { background: #fafafa; font-weight: 600; color: #555; }

tr:hover td { background: #fafafa; }

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tag-draft { background: #f0f0f0; color: #666; }
.tag-preparing { background: #e6f7ff; color: #096dd9; }
.tag-submitted { background: #fff7e6; color: #d46b08; }
.tag-processing { background: #e6f7ff; color: #096dd9; }
.tag-approved { background: #f6ffed; color: #389e0d; }
.tag-rejected { background: #fff2f0; color: #cf1322; }
.tag-resubmitting { background: #fff7e6; color: #d48806; }

.parsed-preview {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 14px;
    margin-top: 12px;
}

.parsed-preview dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 6px 12px;
    font-size: 13px;
}

.parsed-preview dt { color: #888; font-weight: 600; }
.parsed-preview dd { color: #333; }

.upload-zone {
    border: 2px dashed #d9d9d9;
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin: 12px 0;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #1890ff;
    background: #f0f5ff;
}

.upload-zone p { color: #666; font-size: 14px; }
.upload-zone .icon { font-size: 36px; margin-bottom: 8px; }

.file-list {
    list-style: none;
    margin-top: 12px;
}

.file-list li {
    padding: 8px 12px;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-list a { color: #1890ff; text-decoration: none; }
.file-list a:hover { text-decoration: underline; }

.steps {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    color: #999;
    position: relative;
}

.step.active { color: #1890ff; font-weight: 600; }
.step.done { color: #52c41a; }

.form-data-box {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 14px;
    font-size: 13px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: Consolas, monospace;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}

.spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.wizard-steps {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.wizard-step {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    font-size: 13px;
    color: #888;
    cursor: pointer;
}

.wizard-step.active {
    background: #e6f7ff;
    border-color: #1890ff;
    color: #1890ff;
    font-weight: 600;
}

.wizard-panel { display: none; margin-top: 12px; }
.wizard-panel.active { display: block; }

.url-target-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.url-target-row .form-group { flex: 1; min-width: 160px; }
.url-target-row .form-group.url-wide { flex: 2; min-width: 280px; }

.progress-wrap {
    margin: 16px 0;
    display: none;
}

.progress-wrap.active { display: block; }

.progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1890ff, #52c41a);
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s ease;
}

.progress-text {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-row input[type="checkbox"] { width: 16px; height: 16px; }
.checkbox-row label { font-size: 13px; color: #555; cursor: pointer; }

.ai-status {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    margin-bottom: 12px;
}

.ai-status span {
    padding: 4px 10px;
    border-radius: 4px;
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}

.ai-status span.off {
    background: #fff7e6;
    color: #d46b08;
    border-color: #ffd591;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    white-space: nowrap;
}

.btn-sm { padding: 4px 12px; font-size: 12px; }

.header-user .btn-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.45);
}

.header-user .btn-outline:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-color: #fff;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
}

.login-card {
    width: 380px;
    max-width: calc(100% - 32px);
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.login-card h1 { font-size: 22px; color: #1a1a2e; }
.login-card p { font-size: 13px; color: #888; margin: 8px 0 22px; }
.login-card .form-group { margin-bottom: 14px; }
.login-submit { width: 100%; justify-content: center; margin-top: 6px; }
