/* 管理控制台样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f3f4f6;
    min-height: 100vh;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .nav-item-text,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .user-details {
    display: none;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    font-size: 28px;
}

.sidebar-logo-text {
    font-size: 16px;
    font-weight: 600;
}

.sidebar-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.2);
}

/* 导航菜单 */
.nav-menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.nav-section {
    margin-bottom: 8px;
}

.nav-section-title {
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
    border-left-color: #3b82f6;
}

.nav-item-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-item-text {
    font-size: 14px;
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.user-role {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.logout-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.logout-btn:hover {
    opacity: 1;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .main-content {
    margin-left: 70px;
}

/* 顶部栏 */
.topbar {
    background: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.breadcrumb {
    font-size: 13px;
    color: #6b7280;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 内容区域 */
.content-area {
    padding: 24px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-card-icon.green { background: #dcfce7; color: #16a34a; }
.stat-card-icon.purple { background: #f3e8ff; color: #9333ea; }
.stat-card-icon.orange { background: #ffedd5; color: #ea580c; }

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.stat-card-label {
    font-size: 14px;
    color: #6b7280;
    margin-top: 4px;
}

/* 模块面板 */
.module-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

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

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-actions {
    display: flex;
    gap: 8px;
}

.panel-body {
    padding: 24px;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-secondary { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    background: #f9fafb;
}

.data-table td {
    font-size: 14px;
    color: #374151;
}

.data-table tr:hover {
    background: #f9fafb;
}

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

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }
.badge-info { background: #dbeafe; color: #2563eb; }
.badge-secondary { background: #f3f4f6; color: #6b7280; }

/* 表单元素 */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}
.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.form-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* 模块内容区 */
.module-content { display: none; }
.module-content.active { display: block; }

/* 日志样式 */
.logs-container .log-entry {
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 2px;
}
.logs-container .log-time { color: #6b7280; margin-right: 8px; }
.logs-container .log-level { font-weight: 600; margin-right: 8px; }
.logs-container .log-debug { background: rgba(107, 114, 128, 0.1); }
.logs-container .log-info { background: rgba(59, 130, 246, 0.1); }
.logs-container .log-info .log-level { color: #3b82f6; }
.logs-container .log-warning { background: rgba(245, 158, 11, 0.1); }
.logs-container .log-warning .log-level { color: #f59e0b; }
.logs-container .log-error { background: rgba(239, 68, 68, 0.1); }
.logs-container .log-error .log-level { color: #ef4444; }
.logs-container .log-critical { background: rgba(220, 38, 38, 0.2); }
.logs-container .log-critical .log-level { color: #dc2626; }
.logs-container .log-session { 
    color: #10b981; 
    margin-right: 8px; 
    cursor: pointer; 
    font-size: 11px;
    opacity: 0.8;
}
.logs-container .log-session:hover { 
    opacity: 1; 
    text-decoration: underline; 
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider { background-color: #3b82f6; }
input:checked + .slider:before { transform: translateX(20px); }

/* ========== 移动端遮罩层 ========== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    color: #374151;
    border-radius: 6px;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: #f3f4f6;
}

/* ========== 响应式 - 移动端 (< 768px) ========== */
@media (max-width: 767px) {
    /* ----- 侧边栏移动端样式（transform 动画） ----- */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
        box-shadow: none;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }
    
    .sidebar.collapsed {
        width: 280px;
        max-width: 85vw;
    }
    
    .sidebar.collapsed .sidebar-logo-text,
    .sidebar.collapsed .nav-item-text,
    .sidebar.collapsed .nav-section-title,
    .sidebar.collapsed .user-details {
        display: block;
    }
    
    /* ----- 主内容区 ----- */
    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 0;
    }
    
    /* ----- 显示移动端菜单按钮 ----- */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    /* ----- 顶部栏适配 ----- */
    .topbar {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .topbar-left {
        flex: 1;
        min-width: 0;
    }
    
    .page-title {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .breadcrumb {
        display: none;
    }
    
    .topbar-right {
        gap: 8px;
    }
    
    /* ----- 内容区域 ----- */
    .content-area {
        padding: 16px;
    }
    
    /* ----- 统计卡片2列布局 ----- */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .stat-card-value {
        font-size: 22px;
    }
    
    .stat-card-label {
        font-size: 12px;
    }
    
    /* ----- 数据表格水平滚动 ----- */
    .panel-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    /* ----- 表单单列布局 ----- */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .form-row .form-label {
        width: 100%;
    }
    
    .form-row .form-input {
        width: 100%;
    }
    
    /* 表单输入框触摸优化 */
    .form-input,
    .form-select,
    .form-control {
        min-height: 44px;
        font-size: 16px;  /* 防止iOS缩放 */
    }
    
    /* ----- 模态框全屏样式 ----- */
    .modal-overlay {
        padding: 0;
        align-items: stretch;
    }
    
    .modal-container {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .modal-large {
        max-width: 100%;
        width: 100%;
        max-height: 100%;
    }
    
    .modal-header {
        padding: 16px;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 10;
    }
    
    .modal-header h2 {
        font-size: 16px;
    }
    
    .modal-close {
        min-width: 44px;
        min-height: 44px;
        font-size: 28px;
    }
    
    .modal-body {
        padding: 16px;
        flex: 1;
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 12px 16px;
        position: sticky;
        bottom: 0;
        background: #fff;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 100px;
        min-height: 44px;
        justify-content: center;
    }
    
    .modal-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }
    
    .modal-tab {
        flex-shrink: 0;
        min-height: 44px;
    }
    
    /* ----- 面板操作按钮换行 ----- */
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .panel-title {
        font-size: 15px;
    }
    
    .panel-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .panel-actions .btn {
        flex: 1;
        min-width: 80px;
        min-height: 44px;
        justify-content: center;
    }
    
    .panel-body {
        padding: 16px;
    }
    
    /* ----- 日志容器移动端适配 ----- */
    .logs-container {
        max-height: 300px;
        overflow-y: auto;
        font-size: 12px;
    }
    
    .logs-container .log-entry {
        padding: 6px 8px;
        word-break: break-all;
        white-space: normal;
    }
    
    .logs-container .log-time {
        display: block;
        margin-bottom: 2px;
        font-size: 11px;
    }
    
    .logs-container .log-level {
        font-size: 11px;
    }
    
    .logs-container .log-session {
        font-size: 10px;
    }
    
    /* ----- 按钮触摸优化 ----- */
    .btn {
        min-height: 44px;
        padding: 10px 16px;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 8px 12px;
    }
    
    /* ----- 导航项触摸优化 ----- */
    .nav-item {
        min-height: 48px;
        padding: 14px 20px;
    }
    
    /* ----- 侧边栏底部 ----- */
    .sidebar-footer {
        padding: 12px 16px;
    }
    
    .logout-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* ----- 权限编辑器适配 ----- */
    .perm-checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .perm-param-group-content {
        grid-template-columns: 1fr;
    }
    
    .translator-grid,
    .translator-list {
        grid-template-columns: 1fr;
    }
    
    .multi-select-grid {
        grid-template-columns: 1fr;
    }
    
    /* ----- 开关样式适配 ----- */
    .switch {
        flex-shrink: 0;
    }
    
    /* ----- 状态标签适配 ----- */
    .badge {
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* ========== 响应式 - 平板端 (768px - 1024px) ========== */
@media (min-width: 768px) and (max-width: 1024px) {
    /* 侧边栏可折叠为仅图标模式 */
    .sidebar.collapsed {
        width: 70px;
    }
    
    /* 统计卡片2列 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 表单布局调整 */
    .settings-columns {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 模态框宽度调整 */
    .modal-container {
        width: 90%;
        max-width: 700px;
    }
    
    .modal-large {
        max-width: 850px;
    }
    
    /* 内容区域 */
    .content-area {
        padding: 20px;
    }
    
    /* 权限编辑器 */
    .perm-checkbox-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .translator-grid,
    .translator-list {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* 权限编辑器样式 */
.perm-section {
    margin-bottom: 24px;
}

.perm-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.perm-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: #6b7280;
}

.perm-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.perm-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
}

.perm-checkbox-item:hover {
    background: #f3f4f6;
}

.perm-checkbox-item input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.perm-checkbox-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 参数分组 */
.perm-param-group {
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.perm-param-group-header {
    padding: 10px 14px;
    background: #f9fafb;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    transition: background 0.2s;
}

.perm-param-group-header:hover {
    background: #f3f4f6;
}

.perm-param-group-content {
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    background: #fff;
}

/* 语言选择器 */
.lang-selector {
    position: relative;
}

.lang-selector select {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}


/* 模态窗口样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-container {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

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

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

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

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 模态窗口标签页 */
.modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
}

.modal-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

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

.modal-tab.active {
    background: #3b82f6;
    color: #fff;
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

/* 翻译器网格 */
.translator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.translator-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.translator-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.translator-name {
    font-size: 13px;
    color: #374151;
}

.translator-status {
    font-size: 11px;
}

/* 功能权限列表 */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.feature-item:hover {
    background: #f3f4f6;
}

.feature-item input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.feature-item span {
    font-size: 14px;
    color: #374151;
}


/* 权限编辑器样式 */
.modal-large {
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
}

.settings-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}

/* 多选网格 */
.multi-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
}

.multi-select-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
}

.multi-select-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.multi-select-item .item-name {
    color: #374151;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select-item .item-status {
    font-size: 11px;
    margin-left: 8px;
    flex-shrink: 0;
}

/* 表单样式增强 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: #1f2937;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}


/* 权限编辑器双列布局 */
.settings-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.settings-column {
    min-width: 0;
}

.settings-column h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .settings-columns {
        grid-template-columns: 1fr;
    }
}


/* 权限编辑器表单样式 */
.form-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.form-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.form-row .form-label {
    width: 140px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0;
}

.form-row .form-input {
    flex: 1;
}

.form-row .form-input select,
.form-row .form-input input[type="text"],
.form-row .form-input input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.form-row .form-input select:focus,
.form-row .form-input input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.form-row .form-input input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-row .form-desc {
    font-size: 12px;
    color: #6b7280;
    margin-left: 8px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}


/* 权限编辑器 - 参数禁用控制 */
.form-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.form-input-wrapper .form-input {
    flex: 1;
}

.param-ctrl-hint {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.param-disable-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.param-disable-toggle:hover {
    background: #f3f4f6;
}

.param-disable-toggle input {
    display: none;
}

.param-disable-toggle .disable-icon {
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.param-disabled-inherited {
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    cursor: help;
}


/* 权限编辑器 - 白名单覆盖样式 */
.param-disable-toggle.inherited-disabled {
    background: #fef3c7;
    border-radius: 4px;
}

.param-disable-toggle.whitelist-override {
    background: #d1fae5;
    border-radius: 4px;
}

.param-disable-toggle.whitelist-override .disable-icon {
    color: #059669;
}

/* 翻译器选择器样式 */
.translator-selector {
    padding: 8px 0;
}

.translator-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.translator-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.translator-item:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.translator-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.translator-item.inherited-disabled {
    background: #fef3c7;
    border-color: #f59e0b;
}

.translator-item.whitelist-override {
    background: #d1fae5;
    border-color: #10b981;
}

.translator-item.whitelist-override span {
    color: #059669;
    font-weight: 500;
}

/* 参数控制提示 */
.param-ctrl-hint {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 6px;
}
