/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --primary-color: #0b7b78;
    --primary-light: #ecf9f7;
    --text-primary: #1f2a44;
    --text-secondary: #5b728a;
    --text-muted: #6f7e94;
    --border-color: #e2edf5;
    --bg-light: #f9fcfe;
    --danger-color: #e03a3a;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f0f4f8;
    padding: 20px;
    color: var(--text-primary);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

/* ========== 顶部导航 ========== */
.top-bar {
    background: white;
    padding: 10px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    font-size: 13px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #0b3b5c;
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.marquee-warning {
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 600px;
    height: 28px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-radius: 4px;
    padding: 0 12px;
    border-left: 3px solid #f97316;
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 15s linear infinite;
    font-size: 12px;
    color: #c2410c;
    font-weight: 500;
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.nav-links {
    display: flex;
    gap: 24px;
    color: #475569;
}

.nav-links a {
    text-decoration: none;
    color: inherit;
}

.version-badge {
    background: #e9edf2;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 12px;
}

/* 顶部右侧操作区 */
.top-right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 页面完成情况按钮 */
.page-status-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #0b7b78;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.page-status-btn:hover {
    background: #086461;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(11, 123, 120, 0.3);
}

.page-status-btn i {
    font-size: 14px;
}

/* 页面完成情况弹窗 */
.page-status-popover {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 1100px;
    max-height: 85vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.page-status-popover.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.page-status-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
}

.page-status-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.page-status-header h3 i {
    color: #0b7b78;
}

.close-btn {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f1f5f9;
    color: #374151;
}

.page-status-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

/* 四列布局 */
.status-columns-four {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.status-column {
    display: flex;
    flex-direction: column;
}

.status-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    height: fit-content;
}

.status-section:last-child {
    margin-bottom: 0;
}

.status-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.status-section h4 i {
    color: #0b7b78;
    font-size: 13px;
}

.status-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 一级页面标签 */
.status-tag-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.status-tag-item.status-complete {
    border-left: 3px solid #10b981;
}

.status-tag-item.status-incomplete {
    border-left: 3px solid #f59e0b;
}

.tag-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.status-tag-item.status-complete .tag-icon {
    background: #10b981;
    color: white;
}

.status-tag-item.status-incomplete .tag-icon {
    background: #f59e0b;
    color: white;
}

.tag-name {
    flex: 1;
    color: #4b5563;
    font-weight: 500;
}

.tag-status {
    font-size: 11px;
    color: #9ca3af;
}

.status-tag-item.status-complete .tag-status {
    color: #10b981;
}

.status-tag-item.status-incomplete .tag-status {
    color: #f59e0b;
}

/* 二级子页面标签 */
.status-subsection {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 32px;
    font-size: 11px;
    background: #f1f5f9;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.subsection-title {
    flex: 1;
    color: #6b7280;
}

.subsection-status {
    font-size: 10px;
    font-weight: 500;
}

.subsection-status.status-complete {
    color: #10b981;
}

.subsection-status.status-incomplete {
    color: #f59e0b;
}

.page-status-footer {
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 12px 12px;
}

.status-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-item.complete {
    color: #10b981;
    font-weight: 500;
}

.summary-item.incomplete {
    color: #f59e0b;
    font-weight: 500;
}

/* ========== 全局布局 ========== */
.global-layout {
    display: flex;
    gap: 20px;
    min-height: 800px;
    margin-left: 0 !important; /* 强制靠左对齐 */
}

/* 左侧导航容器 */
#left-nav-container {
    flex-shrink: 0;
}

/* ========== 左侧导航 ========== */
.global-nav {
    width: 240px;
    flex-shrink: 0;
    background: white;
    border-radius: 24px;
    padding: 16px 10px;
    border: 1px solid #dbe8f2;
    box-shadow: 0 8px 20px rgba(0,0,0,0.02);
}

.global-nav-section {
    margin-bottom: 20px;
}

.global-nav-title {
    font-size: 12px;
    font-weight: 600;
    color: #62728a;
    padding: 0 12px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.global-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 40px;
    color: #1e4c6b;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    cursor: default;
    transition: background 0.2s;
}

.global-nav-item i {
    width: 20px;
    color: #4f7a9e;
}

.global-nav-item.active {
    background: #ecf9f7;
    border: 1px solid #0b7b78;
    font-weight: 600;
}

.global-nav-item:hover:not(.active) {
    background: #f1f5f9;
}

/* ========== 主内容区 ========== */
.main-content {
    flex: 1;
    min-width: 0;
}

/* ========== 项目头 ========== */
.project-header {
    background: white;
    border-radius: 14px;
    padding: 12px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4b5563;
}

.project-name {
    background: #e6f7f5;
    padding: 4px 14px;
    border-radius: 40px;
    font-weight: 600;
    color: #0d5e5a;
}

.role-tag {
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 30px;
}

.status-badge {
    background: #dbeafe;
    color: #1e4fd9;
    padding: 3px 10px;
    border-radius: 40px;
}

.btn-start {
    background: #0b7b78;
    color: white;
    padding: 4px 16px;
    border-radius: 40px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    border: none;
    font-weight: 500;
}

.exec-tabs {
    display: flex;
    gap: 20px;
    margin-left: auto;
    align-items: center;
}

.exec-tabs span {
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    cursor: default;
    font-size: 14px;
}

.exec-tabs span.active {
    color: #0f766e;
    border-bottom-color: #0f766e;
    font-weight: 500;
}

.project-exec-tab {
    color: #0b7b78;
    font-weight: 500;
}

.project-exec-tab i {
    margin-right: 6px;
}

/* ========== 页面二级导航 ========== */
.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    background: white;
    border-radius: 40px;
    padding: 8px 20px;
    margin-bottom: 24px;
    border: 1px solid #e2edf5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.settings-tab {
    font-size: 14px;
    font-weight: 500;
    color: #4f6b8a;
    padding: 6px 0;
    border-bottom: 3px solid transparent;
    cursor: default;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.settings-tab.active {
    color: #0b7b78;
    border-bottom-color: #0b7b78;
}

.settings-tab i {
    margin-right: 6px;
    font-size: 14px;
}

/* ========== 卡片通用 ========== */
.card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.02);
    border: 1px solid #e2edf5;
}

/* ========== 页面工具栏 ========== */
.page-toolbar {
    background: white;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.page-toolbar h2 {
    font-size: 20px;
    font-weight: 600;
    color: #0b7b78;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px 0;
}

.page-toolbar h2 i {
    color: #0b7b78;
}

.page-toolbar .toolbar-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* ========== 查询栏 ========== */
.search-bar {
    margin-bottom: 20px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #d9e5f0;
    border-radius: 40px;
    padding: 9px 16px;
    width: 280px;
    height: 40px;
}

.search-box i {
    color: #8ba0b8;
    margin-right: 8px;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 13px;
}

.btn-search {
    background: white;
    border: 1px solid #0b7b78;
    color: #0b7b78;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-search:hover {
    background: #0b7b78;
    color: white;
}

/* ========== 新建按钮 ========== */
.btn-create {
    background: #0b7b78;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(11, 123, 120, 0.15);
}

.btn-create:hover {
    background: #096663;
    box-shadow: 0 4px 12px rgba(11, 123, 120, 0.25);
    transform: translateY(-1px);
}

.btn-create:active {
    transform: translateY(0);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f3b4e;
    margin: 0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f3b4e;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: #0b7b78;
}

/* ========== 表单元素 ========== */
.form-group {
    margin-bottom: 18px;
}

/* 表单网格布局 - 一行两个 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 30px;
}

/* ========== 通用按钮 ========== */
.btn-link {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}
.btn-primary,
.btn-save {
    background: var(--primary-color);
    color: white;
    padding: 10px 32px;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 8px rgba(7, 94, 84, 0.1);
    cursor: pointer;
}
.btn-cancel {
    background: white;
    border: 1px solid #c2d5e9;
    padding: 10px 24px;
    border-radius: 40px;
    color: #335577;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.btn-danger {
    background: #dc2626;
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

/* ========== 列表操作区按钮（ICON）标准样式 ========== */
.action-btn {
    display: inline-block;
    background: none;
    border: none;
    font-size: 16px;
    color: #4f7a9e;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 30px;
    transition: all 0.2s;
}

.action-btn:hover:not(.disabled) {
    background: #ecf9f7;
    color: #0b7b78;
}

.action-btn.danger:hover:not(.disabled) {
    background: #ffe6e6;
    color: #d14d42;
}

.action-btn.disabled {
    color: #d1d5db;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.5;
}

.action-btn:active:not(.disabled) {
    transform: scale(0.95);
}

/* ========== 通用工具类 ========== */
.text-small { font-size: 12px; color: #5b728a; }
.row-cards {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}
.col-card {
    flex: 1;
    min-width: 0;
}

.switch-label {
    background: #f0f7fa;
    padding: 4px 12px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #1e4c6b;
    cursor: pointer;
}
.switch-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #0b7b78;
}
.requirement-note {
    color: #e03a3a;
    font-weight: 700;
    font-size: 13px;
    background: #ffe6e6;
    padding: 2px 8px;
    border-radius: 30px;
    display: inline-block;
}
.gray-box {
    background: #eef2f6;
    border: 1px solid #d0e0f0;
    border-radius: 40px;
    padding: 8px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #3a5a7a;
}
.note-text {
    font-size: 12px;
    color: #6f7e94;
    background: #f5f9ff;
    padding: 2px 8px;
    border-radius: 30px;
    display: inline-block;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1 1 200px;
    margin-bottom: 0;
}

.form-label {
    font-size: 12px;
    font-weight: 500;
    color: #1e4c6b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-label i {
    color: #4f7a9e;
}

.required {
    color: #e03a3a;
    margin-left: 4px;
    font-size: 14px;
}

input, textarea, select {
    font-family: inherit;
    background: white;
    border: 1px solid #b9d2ea;
    border-radius: 40px;
    padding: 10px 16px;
    font-size: 13px;
    width: 100%;
    outline: none;
    color: #1f2a44;
}

/* radio 和 checkbox 不应用通用 padding */
input[type="radio"],
input[type="checkbox"] {
    padding: 0;
    width: auto;
    border-radius: 0;
}

/* 文本输入框 - 移除下拉箭头背景 */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"] {
    background-image: none !important;
    background-repeat: no-repeat;
    background-position: inherit;
}

input:focus, textarea:focus, select:focus {
    border-color: #0b7b78;
    box-shadow: 0 0 0 2px rgba(11,123,120,0.1);
}

/* radio 和 checkbox 的 focus 样式已移除，使用浏览器默认行为 */

textarea {
    border-radius: 20px;
    min-height: 70px;
    resize: vertical;
    background-image: none !important;
}

/* ========================================
   标准下拉选择框组件样式
   ========================================
   使用方法：
   <div class="select-wrapper">
       <select id="xxx" class="form-select">
           <option value="value1">选项1</option>
           <option value="value2">选项2</option>
       </select>
   </div>

   说明：
   1. select 元素必须包裹在 .select-wrapper 中
   2. select 元素必须使用 class="form-select"
   3. 右侧会自动显示 FontAwesome 下拉箭头（通过 ::after 伪元素）
   4. border-radius: 40px
   5. 支持 option 内保留原有内容（如图标等）
   ======================================== */

select,
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 8px 36px 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 40px;
    font-size: 14px;
    color: #374151;
    background-color: #ffffff;
    cursor: pointer;
    min-width: 120px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

select:hover,
.form-select:hover {
    border-color: #0b7b78;
}

select:focus,
.form-select:focus {
    outline: none;
    border-color: #0b7b78;
    box-shadow: 0 0 0 3px rgba(11, 123, 120, 0.1);
}

/* select 容器 */
.select-wrapper {
    position: relative;
    display: inline-block;
     width: 100%;
}

.select-wrapper select,
.select-wrapper .form-select {
    width: 100%;
}

/* FontAwesome 下拉箭头（通过 ::after 伪元素） */
.select-wrapper::after {
    content: '\f0d7';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #0b7b78;
    font-size: 12px;
    pointer-events: none;
}

.type-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.type-option {
    background: #f1f5f9;
    padding: 6px 18px;
    border-radius: 40px;
    font-size: 13px;
    color: #1f3b5c;
    border: 1px solid transparent;
    cursor: default;
}

.type-option.active {
    background: #0b7b78;
    color: white;
}

/* ========== 分割面板 ========== */
.split-panel {
    display: flex;
    gap: 28px;
    align-items: stretch;
    flex-wrap: wrap;
}

.form-panel {
    flex: 2;
    min-width: 400px;
}

.file-panel {
    flex: 1.2;
    min-width: 320px;
}

/* ========== 文件上传 ========== */
.upload-area {
    background: #f8fbfe;
    border: 2px dashed #b7d9e9;
    border-radius: 24px;
    padding: 20px 16px;
    text-align: center;
    margin-bottom: 24px;
}

.upload-area i {
    font-size: 32px;
    color: #7ba9c9;
    margin-bottom: 6px;
}

.upload-text {
    font-weight: 500;
    color: #195b5b;
}

.upload-hint {
    font-size: 11px;
    color: #62728a;
    margin-top: 8px;
}

.file-list {
    margin-bottom: 24px;
}

.file-item {
    background: #f1f5f9;
    border-radius: 40px;
    padding: 8px 16px 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    border: 1px solid #d9e6f2;
}

.file-item i.fa-file-pdf {
    color: #d14d42;
}

.file-item i.fa-file-word {
    color: #2b5797;
}

.file-info {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #1d4968;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 11px;
    color: #5d738e;
    margin-left: 6px;
}

.file-actions i {
    color: #8195af;
    margin: 0 4px;
    cursor: default;
    font-size: 14px;
}

.file-actions i:hover {
    color: #0b7b78;
}

/* ========== 模板区域 ========== */
.template-section {
    background: #f9fcfe;
    border-radius: 20px;
    padding: 16px;
    border: 1px solid #d0e2f2;
}

.template-title {
    font-size: 14px;
    font-weight: 600;
    color: #164b66;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
    margin-bottom: 12px;
}

.template-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    background: white;
    padding: 6px 12px;
    border-radius: 40px;
    border: 1px solid #dde9f5;
    color: #1e4c6b;
}

.template-item i {
    color: #0b7b78;
}

.pack-all {
    margin-top: 8px;
    text-align: right;
}

/* ========== 状态标签 ========== */
.info-card {
    background: white;
    border-radius: 20px;
    padding: 18px 20px;
    border: 1px solid #e2edf5;
    margin-top: 24px;
}

.status-tag {
    background: #ecf3fa;
    color: #1f4e77;
    padding: 2px 10px;
    border-radius: 30px;
    font-size: 11px;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.4;
}

.status-tag.success {
    background: #dcf2ef;
    color: #14635e;
}

.status-tag.warning {
    background: #fff4e0;
    color: #a8681c;
}

.status-tag.secondary {
    background: #e9ecf2;
    color: #5b6f88;
}

.status-tag.danger {
    background: #fee2e2;
    color: #b91c1c;
}

.status-tag.info {
    background: #e1f0fa;
    color: #1f6e9c;
}

.status-tag.inactive {
    background: #fee2e2;
    color: #b91c1c;
}

.status-tag.disabled {
    background: #fee2e2;
    color: #b91c1c;
}

/* ========== 弹窗 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

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

.modal-overlay.hidden {
    display: none !important;
}

.modal-content {
    background: white;
    border-radius: 24px;
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #0f3b4e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-header h2 i {
    color: var(--primary-color);
}
.modal-close {
    width: 32px;
    height: 32px;
    background: #f8fcff;
    border: 1px solid #e2edf5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}
.modal-close:hover {
    background: #fee2e2;
    border-color: #fee2e2;
    color: #dc2626;
}
.modal-body {
    padding: 20px 30px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* 固定高度弹窗样式 */
.modal-content.modal-fixed-height {
    max-height: 85vh;
}

.modal-content.modal-fixed-height .modal-body {
    max-height: calc(85vh - 140px);
    overflow-y: auto;
}

/* 小弹窗样式 */
.modal-content.modal-sm {
    max-width: 360px;
}

/* 大弹窗样式 */
.modal-content.modal-lg {
    max-width: 900px;
}

/* 大弹窗的 body 最小高度 - 用于人员配置等复杂表单 */
.modal-content.modal-lg .modal-body {
    min-height: 827px;
}

/* 小弹窗的 body 自适应内容 */
.modal-content.modal-sm .modal-body {
    min-height: auto;
}

/* 超大弹窗样式 */
.modal-content.modal-xl {
    max-width: 1400px;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}
.modal-footer button {
    cursor: pointer;
}

/* ========== 弹窗Tab ========== */
.modal-tabs {
    display: flex;
    gap: 0;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    background: white;
    flex-shrink: 0;
}

/* 标准弹窗Tab样式 */
.modal-tab {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    background: #f9fafb;
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.modal-tab:hover {
    background: #f3f4f6;
    color: #0b7b78;
}

.modal-tab.active {
    background: white;
    color: #0b7b78;
    border-bottom-color: #0b7b78;
    font-weight: 600;
}

/* Tab面板内容区域 */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 方式2：使用 .tab-btn 类 - 圆角背景样式（兼容旧版本） */
.tab-btn {
    padding: 10px 24px;
    background: none;
    border: none;
    border-radius: 40px;
    font-size: 14px;
    color: #5b728a;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f9fcfe;
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 500;
    background: var(--primary-light);
}

/* Tab内容区 - 两种命名方式都支持 */
.tab-content,
.tab-pane {
    display: none;
}

.tab-content.active,
.tab-pane[style*="display: block"] {
    display: block;
}

/* 确保隐藏的tab也占据相同高度 */
.tab-content:not(.active),
.tab-pane[style*="display: none"] {
    display: none !important;
}

/* ========== 弹窗通用组件 ========== */
/* 弹窗内筛选栏 */
.modal-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.modal-filter-input {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
}
.modal-filter-input i {
    position: absolute;
    left: 14px;
    color: #7e95b2;
    font-size: 14px;
}
.modal-filter-input input {
    padding-left: 36px;
    width: 100%;
    background: #f9fcfe;
    border: 1px solid #dde9f5;
}
.modal-filter-select {
    padding: 8px 16px;
    background: #f9fcfe;
    border: 1px solid #dde9f5;
    border-radius: 30px;
    font-size: 13px;
    color: #1f2a44;
    cursor: pointer;
    min-width: 120px;
}

/* 弹窗内日志列表 */
.modal-log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}
.modal-log-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: #f9fcfe;
    border-radius: 16px;
    border: 1px solid #e8f2f8;
}
.modal-log-item i {
    color: #7e95b2;
    font-size: 16px;
    margin-top: 2px;
}
.modal-log-content {
    flex: 1;
    font-size: 13px;
    color: #1f2a44;
    line-height: 1.5;
}
.modal-log-time {
    font-size: 12px;
    color: #6f7e94;
    white-space: nowrap;
    margin-top: 2px;
}

/* 弹窗内分页 */
.modal-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}
.modal-page-item {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    background: white;
    border: 1px solid #dbe8f2;
}
.modal-page-item:hover {
    background: #f1f5f9;
}
.modal-page-item.active {
    background: #0b7b78;
    color: white;
    border-color: #0b7b78;
}
.modal-page-item i {
    font-size: 12px;
}

/* 通用选择项样式（可复用） */
.select-option {
    background: white;
    border: 1px solid #b9d2ea;
    border-radius: 20px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.select-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}
.select-option.selected {
    background: var(--primary-light);
    border: 2px solid var(--primary-color);
}

/* 表格行样式（可复用） */
.table-row {
    display: grid;
    padding: 10px 16px;
    align-items: center;
    border-bottom: 1px solid #e9f0f7;
    font-size: 13px;
}
.table-row.header {
    background: #f5faff;
    font-weight: 600;
    color: #254b68;
}
.table-row:last-child {
    border-bottom: none;
}

/* 表格容器样式（可复用） */
.table-container {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}

/* ========== 角色列表表格通用样式 (.reset-table) ========== */
.reset-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1240px;
    display: grid;
    grid-template-columns: 240px 1fr 140px 120px 120px 120px 80px 80px 80px;
}

.reset-table thead,
.reset-table tbody,
.reset-table tr {
    display: contents;
}

.reset-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #4b5b6b;
    padding: 14px 12px;
    background: #f5faff;
    border-bottom: 1px solid #e2edf5;
}

.reset-table th:nth-child(3),
.reset-table th:nth-child(4),
.reset-table th:nth-child(5),
.reset-table th:nth-child(6) {
    text-align: center;
}

.reset-table th:nth-child(7),
.reset-table th:nth-child(8),
.reset-table th:nth-child(9) {
    text-align: center;
}

.reset-table td {
    padding: 14px 12px;
    font-size: 13px;
    border-bottom: 1px solid #e9f0f7;
    color: #5b728a;
    vertical-align: middle;
}

.reset-table td:nth-child(3),
.reset-table td:nth-child(4),
.reset-table td:nth-child(5),
.reset-table td:nth-child(6) {
    text-align: center;
}

.reset-table td:nth-child(7),
.reset-table td:nth-child(8),
.reset-table td:nth-child(9) {
    text-align: center;
}

.reset-table td.role-desc {
    color: #64748b;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reset-table tr:last-child td {
    border-bottom: none;
}

/* 操作图标组（可复用） */
.action-icons {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}
.action-icons i {
    color: #8b9ab0;
    font-size: 13px;
    cursor: pointer;
}
.action-icons i:hover {
    color: var(--primary-color);
}

/* 图标按钮 */
.btn-icon {
    background: none;
    border: none;
    font-size: 16px;
    color: #4f7a9e;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 30px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #ecf9f7;
    color: #0b7b78;
}

.btn-icon.btn-danger:hover {
    background: #ffe6e6;
    color: #d14d42;
}

.btn-icon.btn-disabled {
    color: #c2d5e9;
    cursor: not-allowed;
}

/* 自定义复选框（可复用） */
.checkbox-custom {
    display: inline-block;
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid #9bb1c9;
    border-radius: 4px;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
}
.checkbox-custom.checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}
.checkbox-custom.checked::after {
    content: "✓";
    color: white;
    font-weight: bold;
}

/* 类型徽章（可复用） */
.type-badge {
    background: #e9f0f6;
    color: #2c506e;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 40px;
    width: fit-content;
}

/* 拖拽手柄（可复用） */
.drag-handle {
    color: #9aa9b9;
    text-align: center;
    font-size: 18px;
    cursor: grab;
}

/* 条件预览文本（可复用） */
.condition-preview {
    color: #64748b;
    font-size: 13px;
    text-align: left;
}



/* ========== 试验方法配置弹窗专用样式 ========== */
.project-type-option {
    background: white;
    border: 1px solid #b9d2ea;
    border-radius: 20px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.project-type-option:hover {
    border-color: var(--primary-color);
    background: #f8fbfe;
}
.project-type-option.selected {
    background: var(--primary-light);
    border: 2px solid var(--primary-color);
}
.group-table {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}
.group-row {
    display: grid;
    grid-template-columns: 1.5fr 2fr 0.8fr 1fr;
    padding: 10px 16px;
    justify-items: center;
    align-items: center;
    border-bottom: 1px solid #e9f0f7;
    font-size: 13px;
}
.group-row:last-child {
    border-bottom: none;
}
.status-tag.inactive {
    background: #eef2f6;
    color: #6f8295;
}

/* ========== 错误提示 ========== */
.error {
    color: #dc2626;
    background: #fef2f2;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
}

/* ========== 加载中 ========== */
.loading {
    color: #64748b;
    padding: 20px;
    text-align: center;
}

/* ========== 页面底部按钮区域 ========== */
.footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 30px;
}

/* ========== 布局工具类 ========== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-stretch { align-items: stretch; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-28 { gap: 28px; }

/* ========== 搜索框 ========== */
.search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #d9e5f0;
    border-radius: 40px;
    padding: 4px 16px;
    width: 280px;
}

.search-box i {
    color: #8ba0b8;
    margin-right: 8px;
}

.search-box input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 13px;
}

.btn-search {
    background: white;
    border: 1px solid #0b7b78;
    color: #0b7b78;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-search:hover {
    background: #0b7b78;
    color: white;
}

/* ========== 链接按钮 ========== */
.btn-link {
    background: transparent;
    border: none;
    color: #0b7b78;
    font-weight: 500;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: opacity 0.1s;
}

.btn-link:hover {
    opacity: 0.8;
}
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-1-2 { flex: 1.2; }
.min-w-0 { min-width: 0; }

/* ========== 间距工具类 ========== */
.m-0 { margin: 0; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-18 { margin-bottom: 18px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.ml-auto { margin-left: auto; }
.mr-4 { margin-right: 4px; }
.mr-8 { margin-right: 8px; }

.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.py-4 { padding-top: 4px; padding-bottom: 4px; }
.py-8 { padding-top: 8px; padding-bottom: 8px; }
.px-12 { padding-left: 12px; padding-right: 12px; }
.px-16 { padding-left: 16px; padding-right: 16px; }

/* ========== 尺寸工具类 ========== */
.w-full { width: 100%; }
.w-60 { width: 60px; }
.w-70 { width: 70px; }
.w-90 { width: 90px; }
.w-100 { width: 100px; }
.w-200 { width: 200px; }
.w-250 { width: 250px; }
.w-280 { width: 280px; }
.w-300 { width: 300px; }
.h-full { height: 100%; }
.min-h-0 { min-height: 0; }

/* ========== 文本工具类 ========== */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.text-base { font-size: 13px; }
.text-lg { font-size: 14px; }
.text-primary { color: #0b7b78; }
.text-danger { color: #e03a3a; }
.text-gray { color: #1f2a44; }
.text-secondary { color: #4a6b8a; }
.text-muted-blue { color: #7e95b2; }
.text-border-gray { color: #5b728a; }
.text-dark { color: #0f3b4e; }
.text-muted { color: #6f7e94; }
.whitespace-nowrap { white-space: nowrap; }
.font-weight-500 { font-weight: 500; }
.font-weight-600 { font-weight: 600; }

/* ========== 背景工具类 ========== */
.bg-white { background: white; }
.bg-light { background: #f9fcfe; }
.bg-info { background: #ecf9f7; }

/* ========== 边框工具类 ========== */
.border { border: 1px solid #e2edf5; }
.border-dashed { border-style: dashed; }
.rounded-full { border-radius: 9999px; }
.rounded-20 { border-radius: 20px; }
.rounded-24 { border-radius: 24px; }

/* ========== 分隔线 ========== */
.divider { border: none; border-top: 1px solid #e2edf5; margin: 12px 0; }
.divider-lg { border: none; border-top: 1px solid #e2edf5; margin: 16px 0; }

/* ========== 提示框 ========== */
.info-box {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    background: #ecf9f7;
    border-left: 4px solid #0b7b78;
    margin-bottom: 24px;
}

.info-box i {
    font-size: 24px;
    color: #0b7b78;
    flex-shrink: 0;
}

.info-box h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2a44;
}

.info-box p {
    margin: 0;
    color: #5b728a;
    font-size: 14px;
    line-height: 1.6;
}

/* ========== 产品提示（product-tips） ========== */
.product-tips {
    margin-top: 20px;
    padding: 20px 24px;
    background: #f0f6fd;
    border-radius: 20px;
    font-size: 13px;
    color: #1e4c6b;
    border: 1px solid #d0e0f0;
}

.product-tips > h5 {
    font-size: 14px;
    font-weight: 600;
    color: #0b7b78;
    margin: 20px 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-tips h4 {
    font-size: 15px;
    font-weight: 600;
    color: #0b7b78;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-tips p {
    margin: 6px 0;
    line-height: 1.5;
}

.product-tips i {
    color: #0b7b78;
    width: 20px;
}

.product-tips .rule-list {
    list-style: none;
    padding-left: 0;
}

.product-tips .rule-list li {
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.product-tips .rule-list li i {
    margin-top: 2px;
}

.product-tips .highlight-red {
    color: #d32f2f;
    font-weight: 600;
}

/* tip-section 样式（用于product-tips内部的子区块） */
.tip-section {
    margin-bottom: 20px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2edf5;
}

.tip-section h5 {
    font-size: 14px;
    font-weight: 600;
    color: #0b7b78;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tip-section p {
    margin: 0 0 8px 0;
    color: #335577;
    line-height: 1.6;
}

.tip-section ul {
    margin: 8px 0;
    padding-left: 20px;
}

.tip-section ul li {
    margin: 6px 0;
    color: #335577;
    line-height: 1.6;
}

/* tip-section 内部的表格样式 */
.tip-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 13px;
}

.tip-section table th {
    background: #f0f7fc;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #0b7b78;
    border-bottom: 2px solid #d0e0f0;
}

.tip-section table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2edf5;
    color: #335577;
}

.tip-section table tr:last-child td {
    border-bottom: none;
}

.tip-section table strong {
    color: #0b7b78;
    font-weight: 600;
}

/* tip-section 内部的代码块样式 */
.tip-section pre {
    background: #f7fbfe;
    border: 1px solid #d0e0f0;
    border-radius: 8px;
    padding: 14px;
    margin: 12px 0;
    overflow-x: auto;
}

.tip-section pre code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #2c3e50;
    line-height: 1.5;
}

/* tip-section 内部的 h5 标题（子标题） */
.tip-section > h5:not(:first-child) {
    margin-top: 16px;
}

/* ========== 登录模式配置样式 ========== */
.login-mode-config {
    margin-top: 24px;
}

.login-mode-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.login-mode-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: white;
    border: 1px solid #e2edf5;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.login-mode-card:hover {
    border-color: #0b7b78;
    box-shadow: 0 4px 12px rgba(11, 123, 120, 0.1);
    transform: translateY(-2px);
}

.login-mode-card:active {
    transform: translateY(0);
}

.login-mode-card .mode-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0b7b78 0%, #0d9d9a 100%);
    border-radius: 12px;
    margin-bottom: 12px;
}

.login-mode-card .mode-icon i {
    font-size: 28px;
    color: white;
}

.login-mode-card .mode-content {
    flex: 1;
    margin-bottom: 12px;
}

.login-mode-card .mode-content h4 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2a44;
}

.login-mode-card .mode-content p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.5;
}

.login-mode-card .mode-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.login-mode-card .mode-actions .fas.fa-cog {
    font-size: 16px;
    color: #8ba0b8;
    transition: all 0.3s ease;
}

.login-mode-card:hover .mode-actions .fas.fa-cog {
    color: #0b7b78;
    transform: rotate(90deg);
}

@media (max-width: 1400px) {
    .login-mode-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .login-mode-list {
        grid-template-columns: 1fr;
    }
}

/* 安全策略分区 - 优化布局 */
.security-section {
    background: #f9fcfe;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2edf5;
    margin-bottom: 20px;
}

.security-section .form-group {
    margin-bottom: 16px;
}

.security-section .form-group:last-child {
    margin-bottom: 0;
}

/* 安全策略行布局 */
.security-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.security-row .security-card {
    background: #f9fcfe;
    border: 1px solid #e2edf5;
    border-radius: 12px;
    padding: 16px;
}

.security-row .security-card.expanded {
    grid-column: span 2;
}

.security-row .security-card:last-child:nth-child(1),
.security-row .security-card:last-child:nth-child(2) {
    grid-column: auto;
}

/* 密码规则、锁定规则、超时规则 */
.security-section {
    background: #f9fcfe;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2edf5;
    margin-bottom: 20px;
}

.security-section .form-group {
    margin-bottom: 16px;
}

.security-section .form-group:last-child {
    margin-bottom: 0;
}

/* 密码规则、锁定规则、超时规则 */
.password-rules,
.lock-rules,
.timeout-rules {
    margin-top: 16px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2edf5;
}

/* 表单网格布局 */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* 复选框行布局 */
.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
}

/* 复选框网格布局（2列） */
.checkbox-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}

/* 开关组合组 */
.switch-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.switch-group .switch {
    min-width: 200px;
}

/* 开关组合组（内联） */
.switch-group-inline {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.switch-group-inline > .switch {
    min-width: 200px;
    flex-shrink: 0;
}

/* 密码设置区 */
.password-settings,
.lock-settings,
.timeout-settings,
.password-expiry-settings,
.sms-settings-group {
    flex: 1;
    transition: all 0.3s ease;
}

/* 禁用状态 */
.password-settings.disabled,
.lock-settings.disabled,
.timeout-settings.disabled,
.password-expiry-settings.disabled,
.sms-settings-group.disabled,
#ipWhitelistSettings.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.password-settings.disabled input,
.lock-settings.disabled input,
.timeout-settings.disabled input,
.password-expiry-settings.disabled input,
.sms-settings-group.disabled input,
.password-settings.disabled textarea,
#ipWhitelistSettings.disabled textarea {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

#ipWhitelistSettings.disabled {
    opacity: 0.5;
    pointer-events: none;
}

#ipWhitelistSettings.disabled textarea {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* 开关旁边的输入框 */
.switch-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch-input input {
    width: 100px;
}

/* 超时设置容器 */
.timeout-settings {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* 多个输入框组合 */
.form-inputs-2 {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


/* 短信验证三列布局 */
.sms-validation-layout {
    display: grid;
    grid-template-columns: auto 0.2fr 1fr;
    gap: 24px;
    align-items: start;
}

.sms-validation-layout .form-group {
    margin-bottom: 0;
}

.sms-validation-layout > .form-group:first-child {
    margin-top: 8px;
}

.sms-settings-group {
    min-height: 40px;
    transition: all 0.3s ease;
    max-width: 200px;
}

.sms-settings-group .form-group {
    max-width: 200px;
}

@media (max-width: 1200px) {
    .sms-validation-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* 扫码方式两列布局 */
.qrcode-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.qrcode-layout .form-group {
    margin-bottom: 0;
}

/* 扫码方式复选框列表 */
.qrcode-checkbox-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.qrcode-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f8f9fc;
    border: 1px solid #e2edf5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 45px;
}

.qrcode-checkbox-item:hover {
    background: #f0f4fa;
    border-color: #0b7b78;
}

.qrcode-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.qrcode-checkbox-item i {
    font-size: 18px;
    color: #5b728a;
    flex-shrink: 0;
}

.qrcode-checkbox-item span {
    flex: 1;
    font-size: 14px;
    color: #1f2a44;
}

@media (max-width: 1200px) {
    .qrcode-checkbox-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .qrcode-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-group input {
    width: 80px;
}

/* 输入框后缀 */
.input-suffix {
    color: #5b728a;
    font-size: 13px;
    white-space: nowrap;
}

/* 密码安全三列布局 */
.password-security-layout {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 20px;
    align-items: center;
}

.password-security-layout .form-group {
    margin-bottom: 0;
}

.password-settings {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1200px) {
    .password-security-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* 复选框组 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #1f2a44;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    white-space: nowrap;
}

.checkbox-label:hover {
    background: #e8f4f3;
    border-color: #0b7b78;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0b7b78;
    margin: 0;
    flex-shrink: 0;
}

.checkbox-text {
    user-select: none;
}

/* 单选框组 */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.radio-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #1f2a44;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #0b7b78;
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
}

.status-enabled {
    background: #dff9f0;
    color: #0b7b78;
}

.status-disabled {
    background: #f1f5f9;
    color: #64748b;
}

/* 调整锁图标宽度以保持一致性 */
.fa-lock {
    padding: 0 1.5px;
}

/* 安全警告样式 */
.security-warning {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #b91c1c;
    flex-shrink: 0;
}

.security-warning i {
    font-size: 14px;
    flex-shrink: 0;
}

.radio-label .text-small {
    margin-top: 4px;
    margin-left: 28px;
}

/* 网络环境卡片选择器 */
.network-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.network-card {
    position: relative;
    cursor: pointer;
}

.network-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.network-card .card-content {
    padding: 20px 16px;
    background: #f9fcfe;
    border: 2px solid #e2edf5;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s;
}

.network-card .card-content i {
    font-size: 28px;
    color: #7ba9c9;
    margin-bottom: 12px;
    display: block;
}

.network-card .card-content strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1f2a44;
    margin-bottom: 6px;
}

.network-card .card-content small {
    display: block;
    font-size: 12px;
    color: #6f7e94;
    line-height: 1.5;
}

.network-card:hover .card-content {
    border-color: #0b7b78;
    background: #ecf9f7;
}

.network-card:hover .card-content i {
    color: #0b7b78;
}

.network-card input:checked ~ .card-content {
    background: #0b7b78;
    border-color: #0b7b78;
    box-shadow: 0 4px 12px rgba(11, 123, 120, 0.2);
}

.network-card input:checked ~ .card-content i {
    color: white;
}

.network-card input:checked ~ .card-content strong {
    color: white;
}

.network-card input:checked ~ .card-content small {
    color: rgba(255, 255, 255, 0.85);
}

/* 开关组件 */
.switch {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    min-height: 39px;
}

.switch input {
    display: none;
}

.switch-label {
    cursor: pointer;
    flex-shrink: 0;
}

.switch-slider {
    position: relative;
    display: block;
    width: 48px;
    height: 24px;
    background: #c2d5e9;
    border-radius: 24px;
    transition: all 0.3s;
    cursor: pointer;
}

.switch-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.switch input:checked ~ .switch-label .switch-slider {
    background: #0b7b78;
    box-shadow: 0 0 0 4px rgba(11, 123, 120, 0.1);
}

.switch input:checked ~ .switch-label .switch-slider::before {
    transform: translateX(24px);
}

.switch:hover .switch-slider {
    box-shadow: 0 0 0 4px rgba(11, 123, 120, 0.05);
}

.switch input:checked:hover ~ .switch-label .switch-slider {
    box-shadow: 0 0 0 6px rgba(11, 123, 120, 0.15);
}

.switch-text {
    color: #5b728a;
    font-size: 13px;
}

/* 颜色选择器 */
.color-picker {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-picker input[type="color"] {
    width: 48px;
    height: 36px;
    border: 1px solid #b9d2ea;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
}

.color-picker input[type="text"] {
    flex: 1;
}

/* 文件上传 */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    display: none;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: white;
    color: #0b7b78;
    border: 1px dashed #0b7b78;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.upload-btn:hover {
    background: #ecf9f7;
}

.logo-preview-box,
.bg-preview-box {
    margin-top: 12px;
    padding: 16px;
    border: 1px dashed #b9d2ea;
    border-radius: 8px;
    text-align: center;
    background: white;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-preview-box img,
.bg-preview-box img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.logo-preview-box i,
.bg-preview-box i {
    font-size: 32px;
    color: #9ca3af;
}

/* ========== 状态标签 ========== */
.status-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-tag.success {
    background: #e8f8f5;
    color: #0b7b78;
}

.status-tag.inactive {
    background: #f3f4f6;
    color: #6b7280;
}

/* ========== 分组标题 ========== */
.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #0b7b78;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f4f3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    font-size: 15px;
}

/* 表单分组 */
.form-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2edf5;
    margin-bottom: 20px;
}

.form-section .section-title {
    margin-top: 0;
}

/* ========== 组合布局类 ========== */
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col-center { display: flex; flex-direction: column; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-start { display: flex; align-items: flex-start; }
