* { margin: 0; padding: 0; box-sizing: border-box; caret-color: transparent; }
input, textarea, select, [contenteditable="true"] { caret-color: auto; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f0f2f5; cursor: default; }
canvas { outline: none; -webkit-tap-highlight-color: transparent; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: #555; font-size: 14px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { 
    width: 100%; padding: 10px 12px; border: 2px solid #e1e5eb; border-radius: 6px; 
    font-size: 14px; transition: border-color 0.2s; background: white; color: #333;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #667eea; }
.form-group input:disabled { background: #f5f5f5; cursor: not-allowed; }
.form-group .hint { font-size: 12px; color: #888; margin-top: 4px; }
.badge { padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; display: inline-block; }
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; }
.modal.show { display: flex; }
.modal-content { background: white; border-radius: 10px; width: 480px; max-width: 95%; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 18px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 17px; color: #333; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #999; }
.modal-close:hover { color: #333; }
.modal-body { padding: 20px; }
.modal-footer { padding: 15px 20px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 10px; }
.btn-cancel { padding: 9px 18px; background: #e9ecef; color: #495057; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-submit { padding: 9px 18px; background: #667eea; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-cancel:hover { background: #dee2e6; }
.btn-submit:hover { background: #5a6fd6; }


.section-title { font-size: 14px; font-weight: 600; color: #333; margin: 20px 0 12px 0; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.section-title:first-child { margin-top: 0; }
.modal-content { max-width: 600px; width: 600px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; min-width: 0; }


/* 大模态框 */
.modal-lg { max-width: 700px; width: 700px; }

/* 选项卡样式 */
.modal-tabs {
    display: flex;
    border-bottom: 2px solid #e1e5eb;
    margin-bottom: 20px;
    gap: 5px;
}
.modal-tab {
    padding: 10px 18px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    border-radius: 6px 6px 0 0;
}
.modal-tab:hover {
    color: #667eea;
    background: #f8f9fa;
}
.modal-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f0f4ff;
}
.modal-tab-content {
    display: none;
}
.modal-tab-content.active {
    display: block;
}

/* 带按钮的输入框 */
.input-with-btn {
    display: flex;
    gap: 8px;
}
.input-with-btn input {
    flex: 1;
    min-width: 0;
}
.btn-copy {
    padding: 8px 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}
.btn-copy:hover {
    background: #5a6fd6;
}

/* 必填标记 */
.required {
    color: #e74c3c;
}

/* 可复制代码样式 */
code.copyable {
    cursor: pointer;
    padding: 2px 6px;
    background: #f5f5f5;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
}
code.copyable:hover {
    background: #e8e8e8;
}

/* Toast提示 */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    animation: toastIn 0.3s ease;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* 授权编辑 - 软件分类样式 */
.auth-sw-container {
    display: flex;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    overflow: hidden;
    min-height: 300px;
}
.auth-sw-tabs {
    width: 180px;
    background: #f8f9fa;
    border-right: 1px solid #e1e5eb;
    max-height: 350px;
    overflow-y: auto;
}
.auth-sw-tab {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #e1e5eb;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    transition: all 0.2s;
}
.auth-sw-tab:hover {
    background: #e9ecef;
}
.auth-sw-tab.active {
    background: #fff;
    border-right: 2px solid #667eea;
    margin-right: -1px;
}
.auth-sw-tab input[type="checkbox"] {
    width: 16px;
    height: 16px;
}
.auth-sw-contents {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 350px;
}
.auth-sw-content {
    display: none;
}
.auth-sw-content.active {
    display: block;
}
.auth-ct-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}
.auth-ct-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.auth-ct-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.auth-ct-item:hover {
    background: #e9ecef;
}
.auth-ct-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
}
.auth-ct-item .ct-name {
    flex: 1;
    font-weight: 500;
}
.auth-ct-item .ct-info {
    color: #666;
    font-size: 12px;
}
.auth-ct-item .ct-price {
    color: #e67e22;
    font-weight: 500;
    font-size: 13px;
}
.auth-perms {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}
.auth-perms label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
