* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* ========== Windows 系统兼容性和无障碍访问 ========== */
:focus {
    outline: 2px solid #42A5F5;
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid #42A5F5;
    outline-offset: 2px;
}

::-moz-focus-inner {
    border: 0;
}

::selection {
    background-color: #BBDEFB;
    color: #1976D2;
}

/* Windows 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 5px;
    border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

::-webkit-scrollbar-corner {
    background: #f1f1f1;
}

/* Firefox 滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* Windows 表单控件一致性 */
input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: #42A5F5;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* Windows 输入框聚焦样式优化 */
.text-input:focus,
.number-input:focus,
.date-input:focus {
    outline: none;
    border-color: #64B5F6;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
}

/* Windows 链接键盘导航样式 */
a:focus-visible,
a.main-nav:focus-visible,
.quick-nav a:focus-visible {
    outline: 2px solid #42A5F5;
    outline-offset: 2px;
    background-color: #f0f7ff;
}

/* Windows 去除文本选中时的默认蓝底白字 */
::-moz-selection {
    background-color: #BBDEFB;
    color: #1976D2;
}

.container {
    max-width: 1400px;
    margin: 24px auto;
    padding: 0 24px;
}

/* ========== Header ========== */
header {
    background: linear-gradient(135deg, #64B5F6 0%, #42A5F5 100%);
    color: white;
    padding: 28px 36px;
    border-radius: 16px;
    margin-bottom: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 24px rgba(25, 118, 210, 0.25);
    width: 1720px;
}

header h1 {
    font-size: 26px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.5px;
}

header h1 .beta-tag {
    font-size: 12px;
    background-color: #42A5F5;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    vertical-align: middle;
    margin-left: 8px;
}

.admin-mode {
    display: flex;
    align-items: center;
}

.admin-button {
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.admin-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.admin-button.active {
    background-color: white;
    color: #42A5F5;
    font-weight: 600;
}

/* ========== Dashboard Layout ========== */
.dashboard {
    display: flex;
    gap: 28px;
}

/* ========== Sidebar ========== */
.sidebar {
    flex: 0 0 320px;
    background-color: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    height: fit-content;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    position: sticky;
    top: 24px;
}

.sidebar h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #42A5F5;
    padding-bottom: 12px;
    border-bottom: 2px solid #E3F2FD;
}

#questionnaire-list {
    list-style: none;
    margin-bottom: 20px;
}

#questionnaire-list > li {
    margin-bottom: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    background-color: white;
    border: 2px solid #E3F2FD;
    font-size: 15px;
}

#questionnaire-list > li > span.collapse-toggle {
    display: block;
    padding: 14px 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #64B5F6 0%, #42A5F5 100%);
    border-radius: 8px;
    cursor: pointer;
    position: relative;
}

#questionnaire-list > li > span.collapse-toggle::after {
    content: '▼';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: white;
    transition: transform 0.2s ease;
}

#questionnaire-list > li > span.collapse-toggle.collapsed::after {
    content: '▶';
}

#questionnaire-list > li.collapsed > .sub-menu {
    display: none;
}

#questionnaire-list > li:hover {
    background-color: #f0f7ff;
    border-color: #E3F2FD;
    transform: translateX(4px);
}

#questionnaire-list > li.active {
    background: linear-gradient(135deg, #64B5F6 0%, #42A5F5 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

#questionnaire-list > li.active > span {
    background: transparent;
    color: white;
}

#questionnaire-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 12px 12px 16px 12px;
    display: block;
    color: #333 !important;
    background-color: #f8fbff;
    border-radius: 0 0 8px 8px;
}

#questionnaire-list .sub-menu > li {
    margin-bottom: 6px;
    color: #333 !important;
}

#questionnaire-list .sub-menu > li > a.main-nav {
    display: block;
    padding: 8px 12px;
    margin-bottom: 3px;
    font-size: 14px;
    border-radius: 6px;
    background-color: transparent;
    color: #555;
    transition: all 0.2s ease;
    text-decoration: none;
    border-left: none;
    position: relative;
}

#questionnaire-list .sub-menu > li > a.main-nav:hover {
    background-color: #f0f7ff;
    color: #42A5F5;
    padding-left: 16px;
}

#questionnaire-list .sub-menu > li > a.main-nav.active {
    background-color: #BBDEFB;
    color: #1976D2;
    font-weight: 500;
    border-left: none;
}

#questionnaire-list .sub-menu > li > a.has-submenu {
    padding-right: 30px;
}

#questionnaire-list .sub-menu > li > a.has-submenu::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #888;
    transition: transform 0.2s ease;
}

#questionnaire-list .sub-menu > li > a.has-submenu.collapsed::after {
    content: '▶';
}

#questionnaire-list .sub-menu > li > ul.quick-nav {
    display: block;
}

#questionnaire-list .sub-menu > li > ul.quick-nav.collapsed {
    display: none;
}

.quick-nav {
    list-style: none;
    margin: 2px 0 0 8px;
    padding: 0 0 0 8px;
    display: block;
    border-left: none;
}

.quick-nav li {
    margin-bottom: 2px;
}

.quick-nav a {
    display: block;
    padding: 5px 8px;
    margin-bottom: 2px;
    font-size: 12px;
    border-radius: 4px;
    background-color: transparent;
    color: #888;
    transition: all 0.2s ease;
    text-decoration: none;
}

.quick-nav a:hover {
    background-color: #E3F2FD;
    color: #64B5F6;
}

.quick-nav a.active {
    background-color: #E3F2FD;
    color: #42A5F5;
    font-weight: 500;
}

#add-questionnaire {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #E3F2FD 0%, #E3F2FD 100%);
    color: #64B5F6;
    border: 2px dashed #E3F2FD;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#add-questionnaire:hover {
    background: linear-gradient(135deg, #E3F2FD 0%, #E3F2FD 100%);
    border-color: #E3F2FD;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.15);
}

/* ========== Template Section ========== */
.template-section {
    margin-bottom: 0;
    padding-bottom: 20px;
}

.template-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #42A5F5;
    padding-bottom: 12px;
    border-bottom: 2px solid #E3F2FD;
}

.template-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.template-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: white;
    border: 2px solid #E3F2FD;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 14px;
    color: #333;
}

.template-item:hover:not(.disabled) {
    background-color: #F0F7FF;
    border-color: #64B5F6;
    transform: translateX(4px);
}

.template-item.disabled {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
}

.template-item.disabled .template-icon {
    opacity: 0.5;
}

.template-radio {
    margin-right: 12px;
    accent-color: #42A5F5;
    width: 18px;
    height: 18px;
}

.template-icon {
    font-size: 18px;
    margin-right: 10px;
}

.template-name {
    flex: 1;
    font-weight: 500;
}

.template-badge {
    background-color: #FF9800;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.template-item input:checked + .template-icon + .template-name {
    color: #1976D2;
    font-weight: 600;
}

.template-item:has(input:checked) {
    background-color: #E3F2FD;
    border-color: #42A5F5;
}

div#template-section > div.template-list > label.template-item:nth-child(1) {
    width: 272px;
    font-size: 12px;
    height: 30px;
}

div#template-section > div.template-list > label.template-item:nth-child(1) > input.template-radio {
    height: 15px;
}

div#template-section > div.template-list > label.template-item:nth-child(2) {
    height: 30px;
}

div#template-section > div.template-list > label.template-item:nth-child(2) > span.template-name {
    font-size: 12px;
}

div#template-section > div.template-list > label.template-item:nth-child(2) > input.template-radio {
    height: 15px;
}

.template-section .add-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #42A5F5 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.template-section .add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

/* ========== Module Divider ========== */
.module-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #E3F2FD 20%, #E3F2FD 80%, transparent);
    margin: 20px 0;
}

/* ========== My Briefs Section ========== */
.my-briefs-section {
    margin-top: 0;
    padding-top: 0;
}

.my-briefs-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #FF9800;
    padding-bottom: 12px;
    border-bottom: 2px solid #FFF3E0;
}

#my-briefs-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#my-briefs-list li {
    margin-bottom: 6px;
}

#my-briefs-list .brief-nav-item {
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    background-color: white;
    border: 2px solid #FFE0B2;
    font-size: 14px;
}

#my-briefs-list .brief-nav-item > .brief-collapse-toggle,
#my-briefs-list .brief-nav-item > .brief-title {
    display: block;
    padding: 10px 14px;
    font-weight: 600;
    color: #FF9800;
    background: linear-gradient(135deg, #FFF8E1 0%, #FFF3E0 100%);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
}

#my-briefs-list .brief-nav-item > .brief-collapse-toggle::after {
    content: '▼';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #FF9800;
    transition: transform 0.2s ease;
}

#my-briefs-list .brief-nav-item.collapsed > .brief-collapse-toggle::after {
    content: '▶';
}

#my-briefs-list .brief-nav-item > .brief-title {
    padding-left: 32px;
}

#my-briefs-list .brief-nav-item > .brief-collapse-toggle {
    display: none;
}

#my-briefs-list .brief-nav-item > .brief-title::before {
    content: '▼';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #FF9800;
    transition: transform 0.2s ease;
}

#my-briefs-list .brief-nav-item.collapsed > .brief-title::before {
    content: '▶';
}

#my-briefs-list .brief-nav-item:hover {
    background-color: #FFF8E1;
    border-color: #FFB74D;
    transform: translateX(4px);
}

#my-briefs-list .brief-nav-item.active {
    background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

#my-briefs-list .brief-nav-item.active > .brief-title {
    background: transparent;
    color: white;
}

#my-briefs-list .brief-nav-item.active > .brief-title::before {
    color: white;
}

#my-briefs-list .brief-sub-menu {
    list-style: none;
    margin: 0;
    padding: 8px 12px 12px 12px;
    display: block;
    color: #333;
    background-color: #FFFDF5;
    border-radius: 0 0 6px 6px;
}

#my-briefs-list .brief-sub-menu.collapsed {
    display: none;
}

#my-briefs-list .brief-sub-menu > li {
    margin-bottom: 4px;
}

#my-briefs-list .brief-sub-menu a {
    display: block;
    padding: 8px 12px;
    margin-bottom: 3px;
    font-size: 13px;
    border-radius: 6px;
    background-color: transparent;
    color: #666;
    transition: all 0.2s ease;
    text-decoration: none;
    border-left: none;
    position: relative;
}

#my-briefs-list .brief-sub-menu a:hover {
    background-color: #FFF3E0;
    color: #FF9800;
    padding-left: 16px;
}

#my-briefs-list .brief-sub-menu a.has-submenu {
    padding-right: 30px;
}

#my-briefs-list .brief-sub-menu a.has-submenu::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #888;
    transition: transform 0.2s ease;
}

#my-briefs-list .brief-sub-menu a.has-submenu.collapsed::after {
    content: '▶';
}

#my-briefs-list .brief-sub-menu .quick-nav {
    display: block;
    list-style: none;
    margin: 2px 0 0 8px;
    padding: 0 0 0 8px;
    border-left: none;
}

#my-briefs-list .brief-sub-menu .quick-nav.collapsed {
    display: none;
}

#my-briefs-list .brief-sub-menu .quick-nav li {
    margin-bottom: 2px;
}

#my-briefs-list .brief-sub-menu .quick-nav a {
    display: block;
    padding: 5px 8px;
    margin-bottom: 2px;
    font-size: 12px;
    border-radius: 4px;
    background-color: transparent;
    color: #888;
}

#my-briefs-list .brief-sub-menu .quick-nav a:hover {
    background-color: #FFF3E0;
    color: #FF9800;
}

#my-briefs-list .brief-sub-menu a.brief-delete:hover {
    background-color: #FFEBEE;
    color: #ff5555;
}

#my-briefs-list .empty-message {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 14px;
}

/* ========== Main Content ========== */
.content {
    flex: 1;
    background-color: #ffffff;
    border-radius: 16px;
    padding: 32px 36px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    width: 1500px;
}

#questionnaire-container h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 28px;
    color: #333;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

#questionnaire-container h2 .clear-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

#questionnaire-container h2 .clear-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
}

/* ========== Form Sections ========== */
.form-section {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
    color: #42A5F5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 14px 0;
    color: #444;
    padding-left: 12px;
    border-left: 3px solid #E3F2FD;
}

.form-section h5 {
    font-size: 15px;
    font-weight: 600;
    margin: 20px 0 12px 0;
    color: #555;
}

.form-section h6 {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 10px 0;
    color: #666;
    padding-left: 10px;
    border-left: 2px solid #E3F2FD;
}

/* ========== Form Rows - Key Layout Fix ========== */
.form-row {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.form-row > span {
    font-size: 15px;
    color: #555;
    line-height: 1;
    white-space: nowrap;
}

.form-row > label {
    font-size: 15px;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
    margin-bottom: 6px;
    line-height: 1;
}

/* ========== Text/Number/Date Inputs ========== */
.text-input, .number-input, .date-input {
    padding: 0 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.25s ease;
    background-color: #fafafa;
    height: 28px;
    min-width: 80px;
    line-height: 1;
    vertical-align: middle;
}

.text-input:hover, .number-input:hover, .date-input:hover {
    border-color: #E3F2FD;
    background-color: #fff;
}

.text-input:focus, .number-input:focus, .date-input:focus {
    outline: none;
    border-color: #64B5F6;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}

.text-input::placeholder {
    color: #bbb;
}

/* ========== Match Box (Title Generator) ========== */
.match-box {
    background-color: #E3F2FD;
    border: 1.5px solid #E3F2FD;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 15px;
    color: #42A5F5;
    font-weight: 500;
    height: 28px;
    min-width: 80px;
    line-height: 1;
    vertical-align: middle;
}

.match-box:focus {
    outline: none;
    border-color: #64B5F6;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
}

input#match-box-1,
input#match-box-2,
input#match-box-3,
input#match-box-4 {
    width: 100px;
}

input#match-box-1 {
    width: 140px;
    color: #555555;
}

input#match-box-2 {
    width: 120px;
    color: #555555;
}

input#match-box-3 {
    color: #555555;
}

input#match-box-4 {
    color: #555555;
    padding-left: 0px;
    padding-right: 0px;
    width: 105px;
}

/* ========== Input Container ========== */
.input-container {
    position: relative;
    display: inline-block;
}

.input-label {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #f0f2f5;
    color: #999;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 4px;
    pointer-events: none;
    display: none;
}

/* ========== Custom Select (Dropdown) ========== */
.custom-select {
    position: relative;
    display: inline-block;
    min-width: 100px;
    height: 26px;
}

.select-selected {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0 32px 0 12px;
    cursor: pointer;
    user-select: none;
    font-size: 15px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
}

.select-selected::after {
    content: '⌄';
    font-size: 15px;
    color: #999;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.custom-select:hover .select-selected,
.custom-select.open .select-selected {
    border-color: #E3F2FD;
    background-color: #fff;
}

.select-items {
    position: absolute;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    z-index: 99;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: none;
}

.select-items.show {
    display: block;
}

.select-search {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    box-sizing: border-box;
    background-color: #fafafa;
}

.select-search:focus {
    outline: none;
    background-color: #fff;
}

.select-option {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.15s;
}

.select-option:hover {
    background-color: #E3F2FD;
}

.select-option.selected {
    background-color: #E3F2FD;
    color: #42A5F5;
    font-weight: 500;
}

/* ========== Delivery Items ========== */
.delivery-item {
    position: relative;
    background-color: #fafafa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 14px;
    border: 1px solid #eee;
    transition: all 0.25s ease;
}

.delivery-item:hover {
    border-color: #E3F2FD;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
}

.delivery-item .form-row span:first-child {
    content: attr(data-num);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #64B5F6 0%, #42A5F5 100%);
    color: white;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
}

.remove-item {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.remove-item:hover {
    color: #ff5555;
    background-color: #fff0f0;
}

.add-delivery-item {
    text-align: center;
    padding: 14px;
    background: linear-gradient(135deg, #E3F2FD 0%, #fafafa 100%);
    border: 2px dashed #E3F2FD;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64B5F6;
    font-weight: 600;
    font-size: 14px;
}

.add-delivery-item:hover {
    background: linear-gradient(135deg, #E3F2FD 0%, #E3F2FD 100%);
    border-color: #E3F2FD;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.12);
}

.delivery-title {
    font-size: 16px;
    font-weight: 600;
    margin: 24px 0 14px 0;
    color: #444;
    padding-left: 12px;
    border-left: 3px solid #E3F2FD;
}

.delivery-hint {
    font-size: 12px;
    color: #ff0000;
    font-weight: normal;
    margin-left: 8px;
}

/* ========== Checklist Sections ========== */
.form-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.form-section ul li {
    margin-bottom: 14px;
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    padding: 14px 16px;
    background-color: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.form-section ul li.inspection-item {
    display: block;
}

.form-section ul li.inspection-item::before {
    float: left;
    margin-top: 2px;
}

.form-section ul li::before {
    content: attr(data-num);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #64B5F6 0%, #42A5F5 100%);
    color: white;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    margin-right: 4px;
    flex-shrink: 0;
}

/* ========== Cooperation Section ========== */
.form-subsection {
    background-color: #fafafa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid #eee;
}

.form-subsection h4 {
    margin-top: 0;
    margin-bottom: 20px;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 2px solid #E3F2FD;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collapsible-header:hover {
    color: #64B5F6;
}

.collapsible-title {
    font-size: 16px;
    font-weight: 600;
    color: #42A5F5;
}

.collapsible-icon {
    font-size: 13px;
    color: #64B5F6;
    transition: transform 0.2s ease;
}

.collapsible-content {
    margin-top: 20px;
}

.cooperation-item {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.cooperation-item h5 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #555;
    font-size: 15px;
    font-weight: 600;
    padding-left: 12px;
    border-left: 3px solid #E3F2FD;
}

.cooperation-item h6 {
    margin-top: 18px;
    margin-bottom: 12px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    padding-left: 10px;
    border-left: 2px solid #E3F2FD;
}

/* ========== Checkbox Groups ========== */
.checkbox-group {
    background-color: #fafafa;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 14px;
    border: 1px solid #f0f0f0;
}

.checkbox-group-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
    display: block;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    padding: 6px 12px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.checkbox-row label:hover {
    border-color: #E3F2FD;
    background-color: #E3F2FD;
}

.checkbox-row label:has(input:checked) {
    border-color: #64B5F6;
    background-color: #E3F2FD;
    color: #42A5F5;
}

.checkbox-row input[type="checkbox"] {
    accent-color: #64B5F6;
    width: 15px;
    height: 15px;
}

/* ========== Form Actions ========== */
.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
}

#save-questionnaire,
#export-article {
    padding: 14px 32px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#save-questionnaire {
    background: linear-gradient(135deg, #64B5F6 0%, #42A5F5 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

#save-questionnaire:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

#export-article {
    background-color: white;
    color: #555;
    border: 1.5px solid #ddd;
}

#export-article:hover {
    background-color: #f5f5f5;
    border-color: #bbb;
    transform: translateY(-2px);
}

/* ========== Info Icon ========== */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #E3F2FD;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    cursor: help;
    position: relative;
}

.info-icon:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.info-icon:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    z-index: 1001;
}

.footer-copyright {
    text-align: center;
    padding: 24px;
    color: #999;
    font-size: 13px;
    margin-top: 24px;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        flex: none;
        width: 100%;
        position: static;
    }
    
    .content {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    header {
        padding: 20px 24px;
    }
    
    header h1 {
        font-size: 22px;
    }
    
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-row > span,
    .form-row > label {
        line-height: 1.5;
    }
    
    .checkbox-row {
        flex-direction: column;
    }
}

/* ========== Navigation ========== */
.coop-sub-nav {
    list-style: none;
    margin: 0;
    padding: 0 0 0 16px;
    display: block;
}

.coop-sub-nav a {
    font-size: 13px;
    padding: 6px 12px;
}

.coop-sub-nav a::before {
    content: '→ ';
    opacity: 0.5;
}

.coop-sub-nav a.active {
    color: #64B5F6;
    font-weight: 600;
}

/* 图片预览样式 */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.image-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border: 1px solid #E3F2FD;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview:hover {
    border-color: #64B5F6;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

/* 图片预览模态框 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* Multi-select dropdown styles */
.multi-select {
    position: relative;
    display: inline-block;
    min-width: 100px;
    height: 26px;
}

.multi-select-selected {
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0 32px 0 12px;
    cursor: pointer;
    user-select: none;
    font-size: 15px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.multi-select-selected::after {
    content: '⌄';
    font-size: 15px;
    color: #999;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.multi-select:hover .multi-select-selected,
.multi-select.open .multi-select-selected {
    border-color: #E3F2FD;
    background-color: #fff;
}

.multi-select-items {
    position: absolute;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    z-index: 99;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    display: none;
}

.multi-select-items.show {
    display: block;
}

.multi-select-search {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    box-sizing: border-box;
    background-color: #fafafa;
}

.multi-select-search:focus {
    outline: none;
    background-color: #fff;
}

.multi-select-option {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.multi-select-option:hover {
    background-color: #E3F2FD;
}

.multi-select-option.selected {
    background-color: #E3F2FD;
    color: #42A5F5;
    font-weight: 500;
}

.multi-select-option input[type="checkbox"] {
    accent-color: #42A5F5;
    width: 15px;
    height: 15px;
}

/* 退出确认弹窗样式 */
#exit-confirm-modal .modal-content {
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#exit-confirm-modal .modal-header {
    background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    padding: 20px 24px;
}

#exit-confirm-modal .modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
}

#exit-confirm-modal .modal-body {
    padding: 28px 24px;
    text-align: center;
}

.exit-warning-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.exit-warning-desc {
    font-size: 14px;
    color: #666;
    margin: 0;
}

#exit-confirm-modal .modal-footer {
    padding: 16px 24px 24px;
    border-top: none;
    gap: 12px;
    justify-content: center;
}

#exit-confirm-cancel,
#exit-confirm-exit {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

#exit-confirm-exit {
    background-color: #F5F5F5;
    color: #666;
}

#exit-confirm-exit:hover {
    background-color: #E0E0E0;
    color: #333;
}

#exit-confirm-save {
    background: linear-gradient(135deg, #FF9800 0%, #FF5722 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

#exit-confirm-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 87, 34, 0.4);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.validation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.validation-list li {
    padding: 10px 14px;
    margin-bottom: 8px;
    background-color: #fff5f5;
    border-left: 4px solid #ff4d4f;
    border-radius: 4px;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.validation-list li:hover {
    background-color: #ffe8e8;
}

.validation-list li:last-child {
    margin-bottom: 0;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
}

.modal-btn-jump {
    padding: 10px 24px;
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.modal-btn-jump:hover {
    background-color: #40a9ff;
}

/* 品质对标URL输入框宽度调整 */
div#cooperation-1 > div.collapsible-content > div.cooperation-item:nth-of-type(4) > div.benchmark-section:nth-of-type(2) > div.form-row > input.text-input[type="url"] {
    width: 600px;
}

/* 文字框自动扩展 */
textarea.text-input,
input.text-input.auto-expand {
    height: auto;
    min-height: 30px;
    resize: none;
    overflow: hidden;
}

/* 必填项红色*标识 */
.required::before {
    content: '*';
    color: #ff0000;
    font-weight: bold;
    margin-right: 2px;
}

/* 必填标签样式 */
.required-label {
    color: #ff0000;
    font-weight: bold;
}

/* 合作内容1 - AI应用说明样式 */
div#cooperation-1 > div.collapsible-content > div.form-row:nth-child(3) > textarea.text-input {
    padding-top: 5px;
    padding-bottom: 5px;
}

div#cooperation-1 > div.collapsible-content > div.form-row:nth-child(4) > textarea.text-input:nth-child(1) {
    padding-top: 5px;
    padding-bottom: 5px;
    width: 300px;
}

div#cooperation-1 > div.collapsible-content > div.form-row:nth-child(4) > textarea.text-input:nth-child(3) {
    padding-top: 5px;
    padding-bottom: 5px;
    width: 350px;
}

div#cooperation-1 > div.collapsible-content > div.form-row:nth-child(3) > input.number-input {
    padding-left: 0px;
    padding-right: 0px;
}

div#cooperation-1 > div.collapsible-content > div.form-row:nth-child(3) {
    font-size: 14px;
    line-height: 26px;
    height: 16px;
}

div#cooperation-1 > div.collapsible-content > div.form-row:nth-child(1) > span:nth-child(1) {
    font-size: 16px;
}

div#cooperation-1 > div.collapsible-content > div.form-row:nth-child(1) > span:nth-child(4) {
    font-size: 16px;
}

div#cooperation-1 > div.collapsible-content > div.form-row:nth-child(2) > span {
    font-size: 16px;
}

div#cooperation-1 > div.collapsible-content > div.form-row:nth-child(2) > label:nth-child(2) {
    padding-left: 0;
    padding-right: 0;
    padding-top: 8px;
    padding-bottom: 8px;
}

div#cooperation-1 > div.collapsible-content > div.form-row:nth-child(2) > label:nth-child(3) {
    padding-left: 0;
    padding-right: 0;
    padding-top: 8px;
    padding-bottom: 8px;
}

.upload-btn {
    padding: 6px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 8px;
}

.upload-btn:hover {
    background-color: #e0e0e0;
}

/* 验证错误高亮样式 */
.validation-error {
    border: 2px solid #ff0000 !important;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5) !important;
    animation: pulse-red 1s ease-in-out infinite;
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 16px rgba(255, 0, 0, 0.8);
    }
}

/* 文件预览容器 */
.image-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* 图片预览 */
.image-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #E3F2FD;
    border-radius: 6px;
    overflow: visible;
    cursor: pointer;
}

.image-preview img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.image-preview:hover {
    border-color: #64B5F6;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

/* 预览按钮容器 */
.preview-btn-container {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
}

.preview-btn-container button {
    padding: 2px 6px;
    font-size: 11px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.preview-file-btn,
.download-file-btn {
    background-color: #E3F2FD;
    color: #1976D2;
}

.preview-file-btn:hover,
.download-file-btn:hover {
    background-color: #BBDEFB;
}

.remove-file-btn {
    background-color: #FFEBEE;
    color: #C62828;
}

.remove-file-btn:hover {
    background-color: #FFCDD2;
}

/* 文件预览（非图片） */
.file-preview {
    position: relative;
    width: 100px;
    padding: 8px;
    border: 1px solid #E3F2FD;
    border-radius: 6px;
    background-color: #FAFAFA;
    text-align: center;
}

.file-preview:hover {
    border-color: #64B5F6;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.file-icon {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    margin-bottom: 4px;
}

.file-name {
    font-size: 10px;
    color: #333;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 图片预览模态框 */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.image-modal.active {
    display: flex;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}
